Lean
$LEAN_TAG$
|
Wrapper for System.Net.Websockets.ClientWebSocket to enhance testability More...
Classes | |
class | BinaryMessage |
Defines a byte-Type message of websocket data More... | |
class | MessageData |
Defines a message of websocket data More... | |
class | TextMessage |
Defines a text-Type message of websocket data More... | |
Public Member Functions | |
void | Initialize (string url, string sessionToken=null) |
Wraps constructor More... | |
void | Send (string data) |
Wraps send method More... | |
void | Connect () |
Wraps Connect method More... | |
void | Close () |
Wraps Close method More... | |
Public Attributes | |
bool | IsOpen => _client?.State == WebSocketState.Open |
Wraps IsAlive More... | |
Protected Member Functions | |
virtual void | OnMessage (WebSocketMessage e) |
Event invocator for the Message event More... | |
virtual void | OnError (WebSocketError e) |
Event invocator for the Error event More... | |
virtual void | OnOpen () |
Event invocator for the Open event More... | |
virtual void | OnClose (WebSocketCloseData e) |
Event invocator for the Close event More... | |
Events | |
EventHandler< WebSocketMessage > | Message |
Wraps message event More... | |
EventHandler< WebSocketError > | Error |
Wraps error event More... | |
EventHandler | Open |
Wraps open method More... | |
EventHandler< WebSocketCloseData > | Closed |
Wraps close method More... | |
Events inherited from QuantConnect.Brokerages.IWebSocket | |
EventHandler< WebSocketMessage > | Message |
on message event More... | |
EventHandler< WebSocketError > | Error |
On error event More... | |
EventHandler | Open |
On Open event More... | |
EventHandler< WebSocketCloseData > | Closed |
On Close event More... | |
Additional Inherited Members | |
Properties inherited from QuantConnect.Brokerages.IWebSocket | |
bool | IsOpen [get] |
Wraps IsOpen More... | |
Wrapper for System.Net.Websockets.ClientWebSocket to enhance testability
Definition at line 30 of file WebSocketClientWrapper.cs.
void QuantConnect.Brokerages.WebSocketClientWrapper.Initialize | ( | string | url, |
string | sessionToken = null |
||
) |
Wraps constructor
url | The target websocket url |
sessionToken | The websocket session token |
Implements QuantConnect.Brokerages.IWebSocket.
Definition at line 47 of file WebSocketClientWrapper.cs.
void QuantConnect.Brokerages.WebSocketClientWrapper.Send | ( | string | data | ) |
Wraps send method
data |
Implements QuantConnect.Brokerages.IWebSocket.
Definition at line 57 of file WebSocketClientWrapper.cs.
void QuantConnect.Brokerages.WebSocketClientWrapper.Connect | ( | ) |
Wraps Connect method
Implements QuantConnect.Brokerages.IWebSocket.
Definition at line 69 of file WebSocketClientWrapper.cs.
void QuantConnect.Brokerages.WebSocketClientWrapper.Close | ( | ) |
Wraps Close method
Implements QuantConnect.Brokerages.IWebSocket.
Definition at line 117 of file WebSocketClientWrapper.cs.
|
protectedvirtual |
Event invocator for the Message event
Definition at line 180 of file WebSocketClientWrapper.cs.
|
protectedvirtual |
Event invocator for the Error event
e |
Definition at line 189 of file WebSocketClientWrapper.cs.
|
protectedvirtual |
Event invocator for the Open event
Definition at line 198 of file WebSocketClientWrapper.cs.
|
protectedvirtual |
Event invocator for the Close event
Definition at line 207 of file WebSocketClientWrapper.cs.
bool QuantConnect.Brokerages.WebSocketClientWrapper.IsOpen => _client?.State == WebSocketState.Open |
Wraps IsAlive
Definition at line 155 of file WebSocketClientWrapper.cs.
EventHandler<WebSocketMessage> QuantConnect.Brokerages.WebSocketClientWrapper.Message |
Wraps message event
Definition at line 160 of file WebSocketClientWrapper.cs.
EventHandler<WebSocketError> QuantConnect.Brokerages.WebSocketClientWrapper.Error |
Wraps error event
Definition at line 165 of file WebSocketClientWrapper.cs.
EventHandler QuantConnect.Brokerages.WebSocketClientWrapper.Open |
Wraps open method
Definition at line 170 of file WebSocketClientWrapper.cs.
EventHandler<WebSocketCloseData> QuantConnect.Brokerages.WebSocketClientWrapper.Closed |
Wraps close method
Definition at line 175 of file WebSocketClientWrapper.cs.