예제 #1
0
 private void closeTcp()
 {
     tcp.LingerState = new LingerOption(true, 5);
     tcp.Client.Shutdown(SocketShutdown.Both);
     tcp.Dispose();
     tcp.Close();
     tcp = null;
 }
예제 #2
0
 public void Close()
 {
     if (tcp != null)
     {
         double begin = Logger.TimeVal();
         closeTcp();
         tcp           = null;
         closeDuration = Logger.TimeVal() - begin;
     }
 }
예제 #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;
        }
예제 #4
0
 private void closeTcp()
 {
     tcp.LingerState = new LingerOption(true, 5);
       tcp.Client.Shutdown(SocketShutdown.Both);
       tcp.Dispose();
       tcp.Close();
       tcp = null;
 }
예제 #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;
 }
예제 #6
0
 public void Close()
 {
     if (tcp != null)
       {
     double begin = Logger.TimeVal();
     closeTcp();
     tcp = null;
     closeDuration = Logger.TimeVal()-begin;
       }
 }