Commit 4c5163df authored by rna's avatar rna
Browse files

SO_REUSEADDR for all versions.

parent 91691297
Pipeline #2979 passed with stages
in 3 minutes and 42 seconds
......@@ -77,9 +77,10 @@ static inline socket_t _open_receiver(struct arguments *args)
int ssock = socket(AF_INET, SOCK_STREAM, 0);
assert(ssock >= 0);
int yes = 1;
setsockopt(ssock, SOL_SOCKET, SO_REUSEADDR, &yes, sizeof(yes));
if(args->optimized) {
int yes = 1;
setsockopt(ssock, SOL_SOCKET, SO_REUSEADDR, &yes, sizeof(yes));
setsockopt(ssock, SOL_TCP, TCP_QUICKACK, &yes, sizeof(yes));
int recv_buffer_size = args->rcvbuf;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment