コード例 #1
0
        public void Close()
        {
            lock (socketLock)
            {
                if (!IsWork)
                {
                    return;
                }
                IsWork = false;
                ConnectionData.ConnectionClosing();
            }

            if (socket != null)
            {
                socket.Close();
            }

            if (Disconnected != null)
            {
                Disconnected(this, new EventArgs());
            }
        }