Call less syscalls after each accept()

This commit is contained in:
Ian Gulliver
2016-02-29 15:22:10 -08:00
parent e44edeba53
commit 3539f9d640
2 changed files with 4 additions and 2 deletions

View File

@@ -17,6 +17,10 @@ void socket_bound_init(int fd) {
// Called by transport code; safe to assume that fd is a socket
int qlen = 5;
assert(!setsockopt(fd, SOL_TCP, TCP_FASTOPEN, &qlen, sizeof(qlen)));
// These options are inherited through accept()
// Verified by flamingcow on kernel 4.2.0
socket_connected_init(fd);
}
void socket_connected_init(int fd) {