public async void Connect(HTransportOptions tOptions)
 {
     this.tOptions = tOptions;
     this.shouldConnect = true;
     if (connStatus != ConnectionStatus.CONNECTED && connStatus != ConnectionStatus.CONNECTING)
         await ThreadPool.RunAsync(TryToConnectDisconnect, WorkItemPriority.High);
     else if (connStatus == ConnectionStatus.CONNECTING)
         this.onStatus(ConnectionStatus.CONNECTING, ConnectionErrors.CONN_PROGRESS, ErrorMessage.connWhileConnecting);
     else if (connStatus == ConnectionStatus.CONNECTED)
         this.onStatus(ConnectionStatus.CONNECTED, ConnectionErrors.ALREADY_CONNECTED, ErrorMessage.alreadyConn);
 }
예제 #2
0
 public HClient()
 {
     transportOptions = new HTransportOptions();
 }