Start of fastopen support.

This commit is contained in:
Ian Gulliver
2016-02-27 10:12:48 -08:00
parent 675fb51282
commit 79fc645fa0
4 changed files with 14 additions and 5 deletions

View File

@@ -7,7 +7,12 @@
#include "socket.h"
void socket_init(int fd) {
void socket_bound_init(int fd) {
int qlen = 5;
assert(!setsockopt(fd, SOL_TCP, TCP_FASTOPEN, &qlen, sizeof(qlen)));
}
void socket_connected_init(int fd) {
int optval = 1;
assert(!setsockopt(fd, SOL_SOCKET, SO_KEEPALIVE, &optval, sizeof(optval)));
optval = 30;