Commit faee8a34 authored by Pablo's avatar Pablo

Add minimum sender buffer

parent 4288f189
Pipeline #2137 failed with stages
in 21 seconds
......@@ -31,9 +31,12 @@ static inline socket_t _open_sender(struct arguments *args)
assert(!fail);
int sock;
struct addrinfo *iter;
int send_buffer_size = 2048;
for (iter = head; iter != NULL; iter = iter->ai_next) {
sock = socket(iter->ai_family, iter->ai_socktype, iter->ai_protocol);
setsockopt(sock, SOL_SOCKET, SO_SNDBUF, &send_buffer_size, sizeof(send_buffer_size));
if (0 ==connect(sock, iter->ai_addr, iter->ai_addrlen))
break;
close(sock);
......
Markdown is supported
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