public void Close() { if (socket != null) { socket.Close(true); socket = null; } }
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); }
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); }