blob: 484bc317239b5be9ab3ff939b3254ee308dea731 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
#include <errno.h>
#include <fcntl.h>
#include <unistd.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <netdb.h>
#define sock_make_nonblocking(fd) fcntl(fd, F_SETFL, O_NONBLOCK)
#define sock_make_blocking(fd) fcntl(fd, F_SETFL, 0)
#define sockerr_again() (errno == EINPROGRESS || errno == EINTR || errno == EAGAIN)
void closesocket(int fd);
|