public void Dispose() { Disconnect(); SendBuffer.Dispose(); SendBuffer = null; ReceiveBuffer.Dispose(); ReceiveBuffer = null; }
/// <summary>Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.</summary> public void Dispose() { DisConnect(); Socket = null; OnConnecting = null; OnConnected = null; OnDisconnected = null; OnSocketReceive = null; OnSocketSend = null; SendBuffer.Dispose(); ReceiveBuffer.Dispose(); }
/// <summary>Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.</summary> public void Dispose() { lock (_locker) { Disconnect(); Socket = null; OnConnecting = null; OnConnected = null; OnDisconnected = null; OnReceiveBytes = null; OnSendBytes = null; SendBuffer.Dispose(); ReceiveBuffer.Dispose(); } }