TcpListener Methods

The TcpListener type exposes the following members.

  Name Description
Public method AcceptSocket Accepts a pending connection request.
Public method AcceptSocketAsync Accepts a pending connection request as an asynchronous operation.
Public method AcceptTcpClient Accepts a pending connection request.
Public method AcceptTcpClientAsync Accepts a pending connection request as an asynchronous operation.
Public method AllowNatTraversal Enables or disables Network Address Translation (NAT) traversal on a TcpListener instance.
Public method BeginAcceptSocket Begins an asynchronous operation to accept an incoming connection attempt.
Public method BeginAcceptTcpClient Begins an asynchronous operation to accept an incoming connection attempt.
Public method Static member Create Creates a new TcpListener instance to listen on the specified port.
Public method EndAcceptSocket Asynchronously accepts an incoming connection attempt and creates a new Socket to handle remote host communication.
Public method EndAcceptTcpClient Asynchronously accepts an incoming connection attempt and creates a new TcpClient to handle remote host communication.
Public method Equals(Object) Determines whether the specified object is equal to the current object. (Inherited from Object.)
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method GetHashCode Serves as the default hash function. (Inherited from Object.)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method Pending Determines if there are pending connection requests.
Public method Start() Starts listening for incoming connection requests.
Public method Start(Int32) Starts listening for incoming connection requests with a maximum number of pending connection.
Public method Stop Closes the listener.
Public method ToString Returns a string that represents the current object. (Inherited from Object.)
Top
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft