diff options
Diffstat (limited to 'lib/net.c')
-rw-r--r-- | lib/net.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -7,3 +7,8 @@ int xsocket(int domain, int type, int protocol) if (fd < 0) perror_exit("socket %x %x", type, protocol); return fd; } + +void xsetsockopt(int fd, int level, int opt, void *val, socklen_t len) +{ + if (-1 == setsockopt(fd, level, opt, val, len)) perror_exit("setsockopt"); +} |