File: sock.h

package info (click to toggle)
bitlbee 3.6-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,392 kB
  • sloc: ansic: 29,135; xml: 2,282; sh: 905; makefile: 389; python: 221; perl: 41
file content (12 lines) | stat: -rw-r--r-- 377 bytes parent folder | download | duplicates (6)
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);