Bases: circuits.core.components.BaseComponent
This class implements an RFC 6455 compliant WebSockets dispatcher that handles the WebSockets handshake and upgrades the connection.
The dispatcher listens on its channel for Request events and tries to match them with a given path. Upon a match, the request is checked for the proper Opening Handshake information. If successful, the dispatcher confirms the establishment of the connection to the client. Any subsequent data from the client is handled as a WebSocket data frame, decoded and fired as a Read event on the wschannel passed to the constructor. The data from write events on that channel is encoded as data frames and forwarded to the client.
Firing a Close event on the wschannel closes the connection in an orderly fashion (i.e. as specified by the WebSocket protocol).
Parameters: |
|
---|