NetSamples.Common.Net
Class TcpAsyncListener

A sublcass of System.Net.TcpListener that provides asynchronous methods.

Field Summary
NetSamples.Common.Net.TcpAsyncListener.AcceptSocketDelegate acceptSocket
NetSamples.Common.Net.TcpAsyncListener.AcceptTcpClientDelegate acceptTcpClient

Constructor Summary
TcpAsyncListener(int port)
         Constructor.
TcpAsyncListener(System.Net.IPEndPoint endpoint)
         Constructor.
TcpAsyncListener(System.Net.IPAddress address, int port)
         Constructor.

Property Summary
System.Net.IPEndPoint LocalEndPoint
         The local endpoint

Properties inherited from class System.Net.Sockets.TcpListener
Active, LocalEndpoint, Server

Method Summary
System.IAsyncResult BeginAcceptSocket(System.AsyncCallback callback, object state)
         Start an AcceptSocket operation
System.IAsyncResult BeginAcceptTcpClient(System.AsyncCallback callback, object state)
         Start an AcceptTcpClient operation
System.Net.Sockets.Socket EndAcceptSocket(System.IAsyncResult result)
         End an AcceptSocket operation
System.Net.Sockets.TcpClient EndAcceptTcpClient(System.IAsyncResult result)
         End an AcceptTcpClient operation

Methods inherited from class System.Net.Sockets.TcpListener
AcceptSocket, AcceptTcpClient, Finalize, Pending, Start, Stop

Methods inherited from class System.Object
Equals, GetHashCode, GetType, MemberwiseClone, ToString


Field Detail

acceptSocket

private NetSamples.Common.Net.TcpAsyncListener.AcceptSocketDelegate acceptSocket


acceptTcpClient

private NetSamples.Common.Net.TcpAsyncListener.AcceptTcpClientDelegate acceptTcpClient

Constructor Detail

TcpAsyncListener

public TcpAsyncListener(int port)

Constructor.


TcpAsyncListener

public TcpAsyncListener(System.Net.IPEndPoint endpoint)

Constructor.


TcpAsyncListener

public TcpAsyncListener(System.Net.IPAddress address,
                        int port)

Constructor.

Property Detail

LocalEndPoint

public System.Net.IPEndPoint LocalEndPoint

The local endpoint

Method Detail

BeginAcceptSocket

public System.IAsyncResult BeginAcceptSocket(System.AsyncCallback callback,
                                             object state)

Start an AcceptSocket operation


BeginAcceptTcpClient

public System.IAsyncResult BeginAcceptTcpClient(System.AsyncCallback callback,
                                                object state)

Start an AcceptTcpClient operation


EndAcceptSocket

public System.Net.Sockets.Socket EndAcceptSocket(System.IAsyncResult result)

End an AcceptSocket operation


EndAcceptTcpClient

public System.Net.Sockets.TcpClient EndAcceptTcpClient(System.IAsyncResult result)

End an AcceptTcpClient operation