Add note about Buffer abstraction
This commit is contained in:
parent
3a993d8897
commit
776c3e2b29
10
lib/net.js
10
lib/net.js
@ -10,8 +10,16 @@ function debug () {
|
||||
|
||||
var binding = process.binding('net');
|
||||
|
||||
|
||||
// Note about Buffer interface:
|
||||
// I'm attempting to do the simplest possible interface to abstracting raw
|
||||
// memory allocation. This might turn out to be too simple - it seems that
|
||||
// I always use a buffer.used member to keep track of how much I've filled.
|
||||
// Perhaps giving the Buffer a file-like interface with a head (which would
|
||||
// represent buffer.used) that can be seeked around would be easier. I'm not
|
||||
// yet convinced that every use-case can be fit into that abstraction, so
|
||||
// waiting to implement it until I get more experience with this.
|
||||
var Buffer = process.Buffer;
|
||||
|
||||
var IOWatcher = process.IOWatcher;
|
||||
var assert = process.assert;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user