src/Foundation/Net/Gimela.Net.Sockets/UDP/UdpSender.cs
/// <summary>
/// Releases unmanaged and - optionally - managed resources
/// </summary>
/// <param name="disposing"><c>true</c> to release both managed and unmanaged resources; <c>false</c> to release only unmanaged resources.</param>
Releases unmanaged and - optionally - managed resources
Releases unmanaged and - optionally - managed resources
protected virtual void Dispose(bool disposing)
    {
      if (!this.disposed)
      {
        if (disposing)
        {
          Stop();
          waiter.Close();
          if (senderThread != null)
          {
            try
            {
              senderThread.Abort();
            }
            catch (ThreadStateException) { }
            finally
            {
              senderThread = null;
            }
          }
          if (udpClient != null)
          {
            udpClient.Close();
            udpClient = null;
          }
        }
        disposed = true;
      }
    }
protected virtual void Dispose ( bool disposing ) { if ( ! this . disposed ) { if ( disposing ) { Stop ( ) ; waiter . Close ( ) ; if ( senderThread != null ) { try { senderThread . Abort ( ) ; } catch ( ThreadStateException ) { } finally { senderThread = null ; } } if ( udpClient != null ) { udpClient . Close ( ) ; udpClient = null ; } } disposed = true ; } }
Releases unmanaged and - optionally - managed resources
Releases unmanaged and - optionally - managed resources
disposing
bool
None