Skip to content

Commit

Permalink
enhancement: Serial TCP/IP TCP_NODELAY
Browse files Browse the repository at this point in the history
  • Loading branch information
midwan committed Jan 5, 2025
1 parent 2074924 commit eccd015
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/osdep/amiberry_serial.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
#endif

#include <libserialport.h>
#include <netinet/tcp.h>
#include <sys/mman.h>

#define SERIALLOGGING 0
Expand Down Expand Up @@ -287,6 +288,8 @@ static bool tcp_is_connected ()
serialconn = uae_socket_accept(serialsocket);
if (serialconn != UAE_SOCKET_INVALID) {
write_log(_T("TCP: Serial connection accepted\n"));
int opt = 1;
setsockopt(serialsocket, IPPROTO_TCP, TCP_NODELAY, (char*)&opt, sizeof(int));
}
}
}
Expand Down

0 comments on commit eccd015

Please sign in to comment.