MCPcopy Index your code
hub / github.com/binaryjs/binaryjs / BinaryStream

Function BinaryStream

lib/stream.js:6–28  ·  view source on GitHub ↗
(socket, id, create, meta)

Source from the content-addressed store, hash-verified

4// end node
5
6function BinaryStream(socket, id, create, meta) {
7 if (!(this instanceof BinaryStream)) return new BinaryStream(options);
8
9 var self = this;
10
11 Stream.call(this);
12
13
14 this.id = id;
15 this._socket = socket;
16
17 this.writable = true;
18 this.readable = true;
19 this.paused = false;
20
21 this._closed = false;
22 this._ended = false;
23
24 if(create) {
25 // This is a stream we are creating
26 this._write(1, meta, this.id);
27 }
28}
29
30util.inherits(BinaryStream, Stream);
31

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected