From e3631bbe5a524faa9017ab30d9143db92f544420 Mon Sep 17 00:00:00 2001 From: David Wehr <dawehr@iastate.edu> Date: Fri, 3 Mar 2017 01:46:54 -0600 Subject: [PATCH] Added TCP_NODELAY to WiFi socket. --- groundStation/src/backend/backend.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/groundStation/src/backend/backend.c b/groundStation/src/backend/backend.c index 2e6795663..7b1a01f75 100644 --- a/groundStation/src/backend/backend.c +++ b/groundStation/src/backend/backend.c @@ -418,6 +418,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 -- GitLab