(socket)
| 31 | |
| 32 | |
| 33 | function ServerStream(socket) { |
| 34 | Duplex.call(this, {objectMode: true}); |
| 35 | |
| 36 | this.socket = socket; |
| 37 | |
| 38 | this.on('error', function(error) { |
| 39 | logger.warn('ShareDB client message stream error', error); |
| 40 | socket.close('stopped'); |
| 41 | }); |
| 42 | |
| 43 | // The server ended the writable stream. Triggered by calling stream.end() |
| 44 | // in agent.close() |
| 45 | this.on('finish', function() { |
| 46 | socket.close('stopped'); |
| 47 | }); |
| 48 | } |
| 49 | util.inherits(ServerStream, Duplex); |
| 50 | |
| 51 | ServerStream.prototype.isServer = true; |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…