TcpListener

TcpListener CF 1.0

System.Net.Sockets (system.dll) class

This class provides a server-side abstraction of the sockets API. The TcpListener is constructed with a local address and port to which it is automatically bound. A call to Start( ) initiates listening for connection requests . When a request is received, either AcceptSocket( ) or AcceptTcpClient( ) accepts the connection and returns a Socket or a TcpClient you can use to exchange data with the remote client.

 public class  TcpListener  {  // Public Constructors  public  TcpListener  (int   port   );  // obsolete  public  TcpListener  (System.Net.IPAddress   localaddr   , int   port   );    public  TcpListener  (System.Net.IPEndPoint   localEP   );  // Public Instance Properties  public EndPoint  LocalEndpoint  {get; }  // Protected Instance Properties  protected bool  Active  {get; }    protected Socket  Server  {get; }  // Public Instance Methods  public Socket  AcceptSocket  ( );    public TcpClient  AcceptTcpClient  ( );    public bool  Pending  ( );    public void  Start  ( );    public void  Stop  ( );  // Protected Instance Methods  protected override void  Finalize  ( );  // overrides object  } 


C# in a Nutshell
C # in a Nutshell, Second Edition
ISBN: 0596005261
EAN: 2147483647
Year: 2005
Pages: 963

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net