Function silc_socket_set_heartbeat
SYNOPSIS
void silc_socket_set_heartbeat(SilcSocketConnection sock,
SilcUInt32 heartbeat,
void *hb_context,
SilcSocketConnectionHBCb hb_callback,
SilcSchedule schedule);
DESCRIPTION
Sets the heartbeat timeout and prepares the socket for performing
heartbeat in `heartbeat' intervals (seconds). The `hb_context' is
allocated by the application and will be sent as argument to the
`hb_callback' function that is called when the `heartbeat' timeout
expires. The callback `hb_context' won't be touched by the library
but and must be freed by the application. The `schedule' is the
application's scheduler.
|