How to Create
- The TcpListener class provides simple methods that listen for and accept incoming connection requests in blocking synchronous mode
- Use either a TcpClient or a Socket to connect with a TcpListenerCreate a TcpListener using an IPEndPoint
- The Start method to begin listening for incoming connection requests
- The Start will queue incoming connections until you either call the Stop method or it has queued MaxConnections
- Use either AcceptSocket or AcceptTcpClient to pull a connection from the incoming connection request queueCall the Stop method to close the TcpListener
Key To Remember
- TcpListener.Start - Starts listening for incoming connection requests.
- TcpListener.Stop - Stops and Closes the listener, which is listening for incoming connection requests. MaxConnections
- IPEndPoint - Represents a network endpoint as an IP address and a port number.
- LocalEndpoint - Gets the underlying EndPoint of the current TcpListener.
- TcpClient and Socket - Provides set of methods and properties for network communications.
- AcceptSocket, AcceptTcpClien - Accepts a pending connection request.
No comments:
Post a Comment