コード例 #1
0
ファイル: TciClient.cs プロジェクト: VU3ESV/TCILibrary
 private TciClient(string serverIpAddress, uint serverPort, CancellationToken cancellationToken)
 {
     _messageHandler = new TciMessageHandler();
     _messageHandler.OnSocketConnectionChanged += MessageHandler_OnSocketConnectionChanged;
     TransceiverController = new TransceiverController(_messageHandler, this);
     _tciWebSocketClient   = TciWebSocketClient.CreateAsync(serverIpAddress, serverPort, cancellationToken).Result;
     Initialize();
 }
コード例 #2
0
 public void OnMessage(string message, TciWebSocketClient tciWebSocketClient)
 {
     if (_tciWebSocketClient != tciWebSocketClient)
     {
         return;
     }
     OnSocketMessageReceived?.Invoke(this, new TciMessageReceivedEventArgs(message: message));
 }
コード例 #3
0
 public void OnDisConnect(TciWebSocketClient tciWebSocketClient)
 {
     if (_tciWebSocketClient != tciWebSocketClient)
     {
         return;
     }
     OnSocketConnectionChanged?.Invoke(this, new TciConnectedEventArgs(false));
 }
コード例 #4
0
 public void OnConnect(TciWebSocketClient tciWebSocketClient)
 {
     _tciWebSocketClient = tciWebSocketClient;
     OnSocketConnectionChanged?.Invoke(this, new TciConnectedEventArgs(true));
 }