blob: 04d1a5167e98f4273b190ae490044d01dd935afb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
/* ISC license. */
#include <errno.h>
#include <skalibs/error.h>
#include <skalibs/socket.h>
#include <skalibs/ip46.h>
int socket_deadlineconnstamp46 (int s, ip46 const *i, uint16_t port, tain const *deadline, tain *stamp)
{
int e = errno ;
if (socket_connect46(s, i, port) >= 0) return 1 ;
if (!error_isagain(errno) && !error_isalready(errno)) return 0 ;
errno = e ;
return socket_waitconn(s, deadline, stamp) ;
}
|