summaryrefslogtreecommitdiff
path: root/digital/avr
diff options
context:
space:
mode:
authorNicolas Schodet2008-04-04 17:13:27 +0200
committerNicolas Schodet2008-04-04 17:13:27 +0200
commit1822a0a6f82e47f688e374cd48e4c497b2fb15e6 (patch)
tree3d4980e1c78103ea3566e2dab177836beed56e6d /digital/avr
parent717fe69af7efc907ab8adad105504176262a1ed5 (diff)
* digital/avr/modules/host, host/mex:
- added TCP_NODELAY option.
Diffstat (limited to 'digital/avr')
-rw-r--r--digital/avr/modules/host/socket.host.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/digital/avr/modules/host/socket.host.c b/digital/avr/modules/host/socket.host.c
index 9953b3a9..f91140af 100644
--- a/digital/avr/modules/host/socket.host.c
+++ b/digital/avr/modules/host/socket.host.c
@@ -29,6 +29,7 @@
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
+#include <netinet/tcp.h>
#include <arpa/inet.h>
#include <netdb.h>
@@ -72,6 +73,13 @@ socket_client (const char *addr, const char *port)
perror ("socket");
exit (EXIT_FAILURE);
}
+ int on = 1;
+ if (setsockopt (s, IPPROTO_TCP, TCP_NODELAY, (void *) &on, sizeof (on))
+ < 0)
+ {
+ perror ("setsockopt (NODELAY)");
+ exit (EXIT_FAILURE);
+ }
if (connect (s, (struct sockaddr *) &saddr, sizeof (saddr)) < 0)
{
perror ("connect");