1 // Just get the stats, and then don't do anything.
2 // You can't really "read" from a socket. You "connect" to it.
3 // Mostly, this is here so that reading a dir with a socket in it
6 module.exports = SocketReader
8 var inherits = require('inherits')
9 var Reader = require('./reader.js')
11 inherits(SocketReader, Reader)
13 function SocketReader (props) {
15 if (!(self instanceof SocketReader)) {
16 throw new Error('SocketReader must be called as constructor.')
19 if (!(props.type === 'Socket' && props.Socket)) {
20 throw new Error('Non-socket type ' + props.type)
23 Reader.call(self, props)
26 SocketReader.prototype._read = function () {
28 if (self._paused) return
29 // basically just a no-op, since we got all the info we have
30 // from the _stat method