コード例 #1
0
 public ConnectionMonitorThread(ConnectionAdapter ca, NetworkTableConnection ntc)
 {
   base.\u002Ector();
   ConnectionMonitorThread connectionMonitorThread = this;
   this.adapter = ca;
   this.connection = ntc;
 }
コード例 #2
0
 public ServerConnectionAdapter(IOStream ios, ServerNetworkTableEntryStore sntes, IncomingEntryReceiver ier, ServerAdapterManager sam, NetworkTableEntryTypeManager ntetm, NTThreadManager nttm)
 {
   base.\u002Ector();
   ServerConnectionAdapter connectionAdapter = this;
   this.__\u003C\u003Econnection = new NetworkTableConnection(ios, ntetm);
   this.entryStore = sntes;
   this.transactionReceiver = ier;
   this.adapterListener = sam;
   this.gotoState(ServerConnectionState.__\u003C\u003EGOT_CONNECTION_FROM_CLIENT);
   this.readThread = nttm.newBlockingPeriodicThread((PeriodicRunnable) new ConnectionMonitorThread((ConnectionAdapter) this, this.__\u003C\u003Econnection), "Server Connection Reader Thread");
 }
コード例 #3
0
 public virtual void close(ClientConnectionState ccs)
 {
   lock (this.connectionLock)
   {
     this.gotoState(ccs);
     if (this.readThread != null)
     {
       this.readThread.stop();
       this.readThread = (NTThread) null;
     }
     if (this.connection != null)
     {
       this.connection.close();
       this.connection = (NetworkTableConnection) null;
     }
     this.entryStore.clearIds();
   }
 }
コード例 #4
0
    public virtual void reconnect()
    {
      object obj;
      Monitor.Enter(obj = this.connectionLock);
      // ISSUE: fault handler
      try
      {
        this.close();
        IOStream stream;
        try
        {
          stream = this.streamFactory.createStream();
          if (stream != null)
            goto label_6;
        }
        catch (Exception ex)
        {
          int num = 2;
          if (ByteCodeHelper.MapException<Exception>(ex, (ByteCodeHelper.MapFlags) num) == null)
            throw;
          else
            goto label_10;
        }
        Monitor.Exit(obj);
        return;
label_6:
        try
        {
          this.connection = new NetworkTableConnection(stream, this.typeManager);
          this.readThread = this.threadManager.newBlockingPeriodicThread((PeriodicRunnable) new ConnectionMonitorThread((ConnectionAdapter) this, this.connection), "Client Connection Reader Thread");
          this.connection.sendClientHello();
          this.gotoState(ClientConnectionState.__\u003C\u003ECONNECTED_TO_SERVER);
          goto label_15;
        }
        catch (Exception ex)
        {
          int num = 2;
          if (ByteCodeHelper.MapException<Exception>(ex, (ByteCodeHelper.MapFlags) num) == null)
            throw;
          else
            goto label_11;
        }
      }
      __fault
      {
        Monitor.Exit(obj);
      }
label_10:
      // ISSUE: variable of the null type
      __Null local = null;
      goto label_12;
label_11:
      local = null;
label_12:
      // ISSUE: fault handler
      try
      {
        this.close();
      }
      __fault
      {
        Monitor.Exit(obj);
      }
label_15:
      // ISSUE: fault handler
      try
      {
        Monitor.Exit(obj);
      }
      __fault
      {
        Monitor.Exit(obj);
      }
    }
コード例 #5
0
 public virtual void send(NetworkTableConnection ntc)
 {
   ntc.sendEntryAssignment(this);
 }