コード例 #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
ファイル: Connector.cs プロジェクト: Hengle/TestWithUnity5
            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();
                }
            }