コード例 #1
0
 private void OnSocketClose(object sender, CloseEventArgs e)
 {
     PrimusApi.LogFile(DateTime.Now + " : " + "Socket closed");
     _timer.Stop();
     OnConnectionUpdateEvent(false, "Socket Closed");
     System.Threading.Thread.Sleep(1000);
     if (_isReconnect)
     {
         Reconnect();
     }
 }
コード例 #2
0
 private void OnSocketConnect(object sender, EventArgs e)
 {
     _timer.Start();
     _retryCount = 0;
     PrimusApi.LogFile(DateTime.Now + " : " + "Socket connected");
     OnConnectionUpdateEvent(true, "Socket Connected");
     if (_subscriptionMap.Keys.Count > 0)
     {
         ReSubscribeFromMap();
         SubscribeOrderTradeUpdates(_loginId, _deviceType);
     }
 }
コード例 #3
0
 private void OnSocketError(object sender, ErrorEventArgs e)
 {
     PrimusApi.LogFile(DateTime.Now + " : " + "Socket Error occurred" + e.Message);
     OnConnectionUpdateEvent(IsConnected, e.Message);
 }