Function silc_net_tcp_create_listener
SYNOPSIS
SilcNetListener
silc_net_tcp_create_listener(const char **local_ip_addr,
SilcUInt32 local_ip_count, int port,
SilcBool lookup, SilcBool require_fqdn,
SilcSchedule schedule,
SilcNetCallback callback, void *context);
DESCRIPTION
This function creates TCP listener. This is used to create network
listener for incoming connections, and `callback' will be called
everytime new connection is received. If `local_ip_addr' is NULL 'any'
address is used. If provided it can be used bind the listener to
`local_ip_count' many IP addresses provided in `local_ip_addr' table.
On success returns the SilcNetListener context, or NULL on error.
If `require_fqdn' is TRUE the listener will require that the incoming
connection has FQDN to be able to connect. If the `lookup' is TRUE
then the incoming connection hostname will be resolved. If the `port'
is zero (0), operating system will define it automatically.
The `callback' always delivers valid new stream. It is not called
with an error status.
|