예제 #1
0
 public void Close()
 {
     if (socket != null)
     {
         socket.Close(true);
         socket = null;
     }
 }
예제 #2
0
 private void Init()
 {
     if (socket != null)
     {
         socket.Close(false);
         socket = null;
     }
     socket = new TcpSocket();
     socket.Init(serverIP, serverPort, m_connect, m_receive, m_close, m_error);
 }
예제 #3
0
        public void Close()
        {
            if (socket != null)
            {
                socket.Close(true);
                socket = null;
                completionCache.Clear();
                messageQueue.Clear();
                IsDispatch = false;
            }

            if (ping != null)
            {
                Destroy(ping);
                ping = null;
            }

            Destroy(this);
        }