Beispiel #1
0
 public void Dispose()
 {
     Disconnect();
     SendBuffer.Dispose();
     SendBuffer = null;
     ReceiveBuffer.Dispose();
     ReceiveBuffer = null;
 }
Beispiel #2
0
        /// <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();
        }
Beispiel #3
0
 /// <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();
     }
 }