roken: introduce rk_socket_set_keepalive
Change-Id: I3086a10cd3d23bef00336f5db7db3a35ca02d568
This commit is contained in:

committed by
Jeffrey Altman

parent
ee7e345af1
commit
51912c0215
@@ -456,6 +456,10 @@ socket_set_reuseaddr (rk_socket_t, int);
|
|||||||
ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL
|
ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL
|
||||||
socket_set_ipv6only (rk_socket_t, int);
|
socket_set_ipv6only (rk_socket_t, int);
|
||||||
|
|
||||||
|
#define socket_set_keepalive rk_socket_set_keepalive
|
||||||
|
ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL
|
||||||
|
socket_set_keepalive (rk_socket_t, int);
|
||||||
|
|
||||||
#define socket_to_fd rk_socket_to_fd
|
#define socket_to_fd rk_socket_to_fd
|
||||||
ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL
|
ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL
|
||||||
socket_to_fd(rk_socket_t, int);
|
socket_to_fd(rk_socket_t, int);
|
||||||
|
@@ -305,6 +305,16 @@ socket_set_ipv6only (rk_socket_t sock, int val)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Set the that the `sock' keepalive setting.
|
||||||
|
*/
|
||||||
|
|
||||||
|
ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL
|
||||||
|
socket_set_keepalive(rk_socket_t sock, int val)
|
||||||
|
{
|
||||||
|
setsockopt(sock, SOL_SOCKET, SO_KEEPALIVE, (void *)&val, sizeof(val));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a file descriptor from a socket
|
* Create a file descriptor from a socket
|
||||||
*
|
*
|
||||||
|
@@ -123,6 +123,7 @@ HEIMDAL_ROKEN_2.0 {
|
|||||||
rk_socket_set_any;
|
rk_socket_set_any;
|
||||||
rk_socket_set_debug;
|
rk_socket_set_debug;
|
||||||
rk_socket_set_ipv6only;
|
rk_socket_set_ipv6only;
|
||||||
|
rk_socket_set_keepalive;
|
||||||
rk_socket_set_nonblocking;
|
rk_socket_set_nonblocking;
|
||||||
rk_socket_set_port;
|
rk_socket_set_port;
|
||||||
rk_socket_set_portrange;
|
rk_socket_set_portrange;
|
||||||
|
Reference in New Issue
Block a user