Occurs when a remote host attempts to establish a connection with the local system.
The event handler receives an argument of type SocketWrench.AcceptEventArgs containing data related to this event. The following SocketWrench.AcceptEventArgs property provides information specific to this event.
| Property | Description |
|---|---|
| Handle | Gets a value that specifies the socket handle for the listening server. |
The OnAccept event occurs when a remote host attempts to connect to the local system. A connection is not actually established until it has been accepted by the listening server. To accept the connection, the application must call the Accept method.
The PeerAddress or PeerName properties may be used to determine the Internet address and host name of the remote host that is establishing the connection. Note that this information may not be available until after the Accept method is called to accept the connection.
This event is only generated if the socket is in non-blocking mode.