Mentalis.org Security Library documentation

SecureTcpListener.AcceptTcpClient Method 

Accepts a pending connection request.

[Visual Basic]
Overridable Public Function AcceptTcpClient() As SecureTcpClient
[C#]
public virtual SecureTcpClient AcceptTcpClient();

Return Value

A SecureTcpClient used to send and receive data.

Remarks

AcceptTcpClient returns a SecureTcpClient that you can use to send and receive data. Use SecureTcpClient.GetStream to obtain the underlying SecureNetworkStream of the SecureTcpClient. SecureNetworkStream inherits from Stream, which provides a rich collection of methods and properties for network communications.
Note When you are through with the returned SecureTcpClient, be sure to call it's Close method.
Note If you want greater flexibility than a SecureTcpClient offers, consider using AcceptSocket.

Exceptions

Exception TypeCondition
InvalidOperationExceptionThe listener has not been started with a call to Start.
SocketExceptionAn operating system error occurs while accessing the SecureSocket.
SecurityExceptionUnable to create the SSPI credentials.

See Also

SecureTcpListener Class | SecureTcpListener Members | Org.Mentalis.Security.Ssl Namespace