Added NO_DELAY in emulation env.

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
Pol Henarejos 2023-09-05 18:14:18 +02:00
parent 81a598f464
commit 910b2fb75a
No known key found for this signature in database
GPG key ID: C0095B7870A4CCD3

View file

@ -31,6 +31,7 @@
#include "apdu.h"
#include "usb.h"
#include "ccid/ccid.h"
#include <netinet/tcp.h>
int ccid_sock = 0;
int hid_server_sock = 0;
@ -86,6 +87,8 @@ int emul_init(char *host, uint16_t port) {
}
int x = fcntl(ccid_sock, F_GETFL, 0);
fcntl(ccid_sock, F_SETFL, x | O_NONBLOCK);
int flag = 1;
setsockopt(ccid_sock, IPPROTO_TCP, TCP_NODELAY, (char *)&flag, sizeof(int));
// HID server