Skip to content
Snippets Groups Projects
Commit 03663dd2 authored by dawehr's avatar dawehr
Browse files

Added TCP_NODELAY to WiFi socket.

parent 186ad30e
No related branches found
No related tags found
1 merge request!8Controller network
......@@ -422,6 +422,13 @@ int connectToZybo() {
printf("Connecting to Quad @ %s:%u\n", inet_ntoa(addr.sin_addr), ntohs(addr.sin_port));
status = connect(sock, (struct sockaddr *)&addr, sizeof(addr));
int flag = 1;
int result = setsockopt(sock, /* socket affected */
IPPROTO_TCP, /* set option at TCP level */
TCP_NODELAY, /* name of option */
(char *) &flag, /* the cast is historical cruft */
sizeof(int)); /* length of option value */
}
// connection failed
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment