Example #1
0
 private void closeTcp()
 {
     tcp.LingerState = new LingerOption(true, 5);
     tcp.Client.Shutdown(SocketShutdown.Both);
     tcp.Dispose();
     tcp.Close();
     tcp = null;
 }
Example #2
0
 public void Close()
 {
     if (tcp != null)
     {
         double begin = Logger.TimeVal();
         closeTcp();
         tcp           = null;
         closeDuration = Logger.TimeVal() - begin;
     }
 }
Example #3
0
        public void Open()
        {
            double begin = Logger.TimeVal();

            if (tcp != null)
            {
                tcp.Close();
            }
            tcp = new RpcTcpClient(host, port);
            net = tcp.GetStream();
            tcp.ReceiveTimeout = timeout;
            openDuration       = Logger.TimeVal() - begin;
        }
Example #4
0
 private void closeTcp()
 {
     tcp.LingerState = new LingerOption(true, 5);
       tcp.Client.Shutdown(SocketShutdown.Both);
       tcp.Dispose();
       tcp.Close();
       tcp = null;
 }
Example #5
0
 public void Open()
 {
     double begin = Logger.TimeVal();
       if (tcp != null)
     tcp.Close();
       tcp = new RpcTcpClient(host, port);
       net = tcp.GetStream();
       tcp.ReceiveTimeout = timeout;
       openDuration = Logger.TimeVal()-begin;
 }
Example #6
0
 public void Close()
 {
     if (tcp != null)
       {
     double begin = Logger.TimeVal();
     closeTcp();
     tcp = null;
     closeDuration = Logger.TimeVal()-begin;
       }
 }