Extends
Members
connections :Object
Map of connection IDs to open connection managers.
- Object
 
- Source:
 
Methods
_blast(endpoint, data, handler)
Send a request to all connected clients.
| Name | Type | Description | 
|---|---|---|
endpoint | 
            
            string | the endpoint to request data from  | 
        
data | 
            
            object | the request's body data  | 
        
handler | 
            
            function | callback function called each time a client response is received  | 
        
- Source:
 
_client_connected(connection_manager)
Called when a new connection manager has been started.
| Name | Type | Description | 
|---|---|---|
connection_manager | 
            
            module:flitter-socket/ConnectionManager~ConnectionManager | 
- Source:
 
_connect(ws, req)
Route helper for bootstrapping a transactional websocket connection. Wraps the socket in a new {flitter-socket/ConnectionManager~ConnectionManager} and adds it to this.connections.
| Name | Type | Description | 
|---|---|---|
ws | 
            
            WebSocket | the incoming websocket  | 
        
req | 
            
            express/Request | the connection request  | 
        
- Source:
 
_request(endpoint, data, handler, client_id)
Send a request to one websocket client.
| Name | Type | Description | 
|---|---|---|
endpoint | 
            
            string | the endpoint to request data from  | 
        
data | 
            
            object | the request's body data  | 
        
handler | 
            
            function | callback function called when a valid client response has been received.  | 
        
client_id | 
            
            string | connection id to whom the request should be sent.  | 
        
- Source:
 
_request_async(endpoint, data, client_id)
Async wrapper for this._request().
| Name | Type | Description | 
|---|---|---|
endpoint | 
            
            string | the endpoint to request data from  | 
        
data | 
            
            object | the request's body data  | 
        
client_id | 
            
            string | connection id to whom the request should be sent.  | 
        
- Source: