Accepts a pending connection request.
[Visual Basic]
Overridable Public Function AcceptSocket() As SecureSocket
A SecureSocket used to send and receive data.
AcceptSocket returns a SecureSocket that you can use to send and receive data. This SecureSocket is initialized with the IP address and port number of the remote machine. You can use any of the Send and Receive methods available in the Socket class to communicate with the remote machine.
Note When you finish using the Socket, be sure to call its Close method.
Note If your application is relatively simple, consider using the AcceptTcpClient method rather than AcceptSocket. SecureTcpClient provides you with simple methods for sending and receiving data over a network.
Exception Type | Condition |
---|---|
InvalidOperationException | The listener has not been started with a call to Start. |
SocketException | An operating system error occurs while accessing the SecureSocket. |
SecurityException | Unable to create the SSPI credentials. |
SecureTcpListener Class | SecureTcpListener Members | Org.Mentalis.Security.Ssl Namespace