|
Accepts a client connection on a listening socket.
Syntax
object.Accept ( Handle, [Options] )
Parameters
- Handle
- An integer value that specifies the handle of the listening
socket. If the control that invokes this method is not the listening
socket, then the listening socket may continue to listen for
incoming connections. If the control invokes this method using its
own Handle property, it will stop listening for connections.
- Options
- An optional integer value that specifies one or more options. If
this parameter is omitted, the values of the properties listed below
will be used to determine the default options when accepting the
connection.
Value |
Property |
swOptionNone |
None |
swOptionDontRoute |
Route = False |
swOptionKeepAlive |
KeepAlive = True |
swOptionReuseAddress |
ReuseAddress = True |
swOptionNoDelay |
NoDelay = True |
swOptionInLine |
InLine = True |
&H1000 |
swOptionSecure |
Secure = True |
Return Value
A value of zero is returned if the acceptance was successful.
Otherwise, a non-zero error code is returned which indicates the
cause of the failure.
Remarks
To set the Options
argument explicitly, set it as a combination of values chosen from the
table above. Use the appropriate constant if you wish the attribute
corresponding to the property to be True, except for the Route
property. Specifying the swOptionDontRoute option is the same
as setting the Route property to a value of False.
See Also
Backlog Property,
Handle Property,
Listen Method,
Reject Method,
OnAccept Event
|
|