// Just get the stats, and then don't do anything.// You can't really "read" from a socket. You "connect" to it.// Mostly, this is here so that reading a dir with a socket in it// doesn't blow up.module.exports=SocketReadervarinherits=require('inherits')varReader=require('./reader.js')inherits(SocketReader,Reader)functionSocketReader(props){varself=thisif(!(selfinstanceofSocketReader)){thrownewError('SocketReader must be called as constructor.')}if(!(props.type==='Socket'&&props.Socket)){thrownewError('Non-socket type '+props.type)}Reader.call(self,props)}SocketReader.prototype._read=function(){varself=thisif(self._paused)return// basically just a no-op, since we got all the info we have// from the _stat methodif(!self._ended){self.emit('end')self.emit('close')self._ended=true}}