Class: WebSocketClient::SocketByteSink
- Inherits:
-
ByteSink
- Object
- ByteSink
- WebSocketClient::SocketByteSink
show all
- Defined in:
- lib/websocket_client/byte_sink.rb
Constant Summary
Constants inherited
from ByteSink
ByteSink::CR, ByteSink::NL
Instance Method Summary
collapse
Methods inherited from ByteSink
#write_line
Constructor Details
Returns a new instance of SocketByteSink.
22
23
24
|
# File 'lib/websocket_client/byte_sink.rb', line 22
def initialize(socket)
@socket = socket
end
|
Instance Method Details
#flush ⇒ Object
30
31
32
|
# File 'lib/websocket_client/byte_sink.rb', line 30
def flush
@socket.flush
end
|
#write(byte) ⇒ Object
26
27
28
|
# File 'lib/websocket_client/byte_sink.rb', line 26
def write(byte)
@socket.putc( byte )
end
|