socket_timeoutconn.c (321B)
1 /* ISC license. */ 2 3 #include <skalibs/tai.h> 4 #include <skalibs/socket.h> 5 6 int socket_timeoutconn (int s, char const *ip, uint16_t port, unsigned int timeout) 7 { 8 tain stamp, deadline ; 9 tain_now(&stamp) ; 10 tain_addsec(&deadline, &stamp, timeout) ; 11 return socket_deadlineconnstamp4(s, ip, port, &deadline, &stamp) ; 12 }