diff --git a/virtualsmartcard/src/vpcd/vpcd.c b/virtualsmartcard/src/vpcd/vpcd.c index cb5b6f6..371daa3 100644 --- a/virtualsmartcard/src/vpcd/vpcd.c +++ b/virtualsmartcard/src/vpcd/vpcd.c @@ -39,6 +39,7 @@ typedef WORD uint16_t; #include #include #include +#include /* for TCP_NODELAY */ #include #include #include @@ -47,6 +48,7 @@ typedef WORD uint16_t; #define INVALID_SOCKET -1 #endif + #include #include #include @@ -110,6 +112,10 @@ static SOCKET opensock(unsigned short port) if (setsockopt(sock, SOL_SOCKET, SO_NOSIGPIPE, (void *) &yes, sizeof yes) != 0) goto err; #endif +#ifdef TCP_NODELAY + if(setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, (void *) &yes, sizeof yes) != 0) + goto err; +#endif memset(&server_sockaddr, 0, sizeof server_sockaddr); server_sockaddr.sin_family = PF_INET;