Method: EventMachine::HttpClient#send
- Defined in:
- lib/em-http/client.rb
#send(data) ⇒ Object
raw data push from the client (WebSocket) should only be invoked after handshake, otherwise it will inject data into the header exchange
frames need to start with 0x00-0x7f byte and end with an 0xFF byte. Per spec, we can also set the first byte to a value betweent 0x80 and 0xFF, followed by a leading length indicator
123 124 125 126 127 |
# File 'lib/em-http/client.rb', line 123 def send(data) if @state == :websocket send_data("\x00#{data}\xff") end end |