Class: EventMachine::WebSocket::Handler03

Inherits:
Handler
  • Object
show all
Includes:
Framing03, Handshake76
Defined in:
lib/em-websocket/handler03.rb

Instance Attribute Summary

Attributes inherited from Handler

#request, #state

Instance Method Summary collapse

Methods included from Framing03

#initialize_framing, #process_data, #send_frame, #send_text_frame

Methods included from Handshake76

#handshake

Methods inherited from Handler

#handshake, #initialize, #receive_data, #run, #unbind

Constructor Details

This class inherits a constructor from EventMachine::WebSocket::Handler

Instance Method Details

#close_websocketObject



7
8
9
10
11
# File 'lib/em-websocket/handler03.rb', line 7

def close_websocket
  # TODO: Should we send data and check the response matches?
  send_frame(:close, '')
  @state = :closing
end