yev_setup_accept_event()
#
yev_setup_accept_event()
creates and configures a socket for listening on the specified listen_url
with the given parameters.
Prototype
int yev_setup_accept_event(
yev_event_h yev_event,
const char *listen_url,
int backlog,
BOOL shared,
int ai_family,
int ai_flags
);
Parameters
Key |
Type |
Description |
---|---|---|
|
|
The event handle associated with the accept event. |
|
|
The URL specifying the address and port to listen on. |
|
|
The maximum length of the queue for pending connections, default is 512. |
|
|
Indicates whether the socket should be opened as shared. |
|
|
The address family, default is |
|
|
Additional flags for address resolution, default is |
Return Value
Returns 0
on success, or -1
on failure.
Notes
This function must be called before starting an accept event using yev_start_event()
.
Prototype
// Not applicable in JS
Prototype
# Not applicable in Python
Examples
// TODO C examples
// TODO JS examples
# TODO Python examples