Package core :: Module streams :: Class ReadStream |
[hide private]
[frames] | no frames]

# Class ReadStream

source code

    object --+
             |
            ReadStream

Known Subclasses:
  - sock_js.SockJSSocket
  - , net.NetSocket
  - , file_system.AsyncFileReadStream
  - , http.HttpClientResponse
  - , http.HttpServerRequest
  - , http.WebSocket

A mixin module which represents a stream of data that can be read from.

Any class that mixes in this module can be used by a to pump data from a to it.

Instance Methods | [hide private]
data_handler(self, handler) Set a data handler. | source code
pause(self) Pause the ReadStream. | source code
resume(self) Resume reading. | source code
exception_handler(self, handler) Set an execption handler on the stream. | source code
end_handler(self, handler) Set an end handler on the stream. | source code
_to_read_stream(self) | source code

Method Details | [hide private]

### data_handler(self, handler) | source code
Set a data handler. As data is read, the handler will be called with the data. Keyword arguments: Parameters: `handler` - The data handler

### pause(self) | source code
Pause the ReadStream. After calling this, the ReadStream will aim to send no more data to the

### resume(self) | source code
Resume reading. If the ReadStream has been paused, reading will recommence on it.

### exception_handler(self, handler) | source code
Set an execption handler on the stream. param [Block] hndlr. The exception handler

### end_handler(self, handler) | source code
Set an end handler on the stream. Once the stream has ended, and there is no more data to be read, this handler will be called. Keyword arguments: Parameters: `handler` - The exception handler