예제 #1
0
            public void Reset()
            {
                if (workSocket != null)
                {
                    workSocket.Close();
                }
                workSocket = null;
                state      = EConnectorState.Initial;

                // TODO 清理buffer

                IsReceiving = false;
                IsSending   = false;
            }
예제 #2
0
            public void Release()
            {
                ipEndPoint = null;
                if (workSocket != null)
                {
                    workSocket.Close();
                }
                workSocket = null;
                state      = EConnectorState.Initial;

                // TODO 释放buffer

                IsReceiving = false;
                IsSending   = false;
            }
예제 #3
0
            public void Reset()
            {
                if (workSocket != null)
                {
                    workSocket.Close();
                }
                workSocket = null;
                state      = EConnectorState.Initial;

                isReceiving = false;
                isSending   = false;

                if (sendCache != null)
                {
                    sendCache.Clear();
                }
                if (receiveCache != null)
                {
                    receiveCache.Clear();
                }
            }