少年修仙传客户端代码仓库
client_Zxw
2018-09-04 b4d5a32a7cc9035bb1efa29ad062cd2bd70ad898
Core/NetworkPackage/Socket/ClientSocketController.cs
@@ -9,7 +9,8 @@
public class ClientSocketController
{
    Socket m_Socket;
    public Socket socket {
    public Socket socket
    {
        get { return m_Socket; }
    }
@@ -114,18 +115,33 @@
    /// </summary>
    public void CloseConnect()
    {
        try
        {
        isStopTreading = true;
        if (m_packageThread != null)
        {
            m_packageThread.Abort();
        }
        }
        catch (System.Exception ex)
        {
            DebugEx.Log(ex);
        }
        try
        {
        if (m_Socket != null && m_Socket.Connected)
        {
            m_Socket.Shutdown(SocketShutdown.Both);
            m_Socket.Close();
        }
        }
        catch (System.Exception ex)
        {
            DebugEx.Log(ex);
        }
        sendQueue.Clear();
        m_Socket = null;