Skip to content

Commit

Permalink
GDBStub: Use TCP_NODELAY
Browse files Browse the repository at this point in the history
  • Loading branch information
GaryOderNichts committed Nov 28, 2023
1 parent 4de2698 commit 270752a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/Cafe/HW/Espresso/Debugger/GDBStub.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,14 @@ bool GDBServer::Initialize()
return false;
}

int nodelayEnabled = TRUE;
if (setsockopt(m_server_socket, IPPROTO_TCP, TCP_NODELAY, (char*)&nodelayEnabled, sizeof(nodelayEnabled)) == SOCKET_ERROR)
{
closesocket(m_server_socket);
m_server_socket = INVALID_SOCKET;
return false;
}

memset(&m_server_addr, 0, sizeof(m_server_addr));
m_server_addr.sin_family = AF_INET;
m_server_addr.sin_addr.s_addr = htonl(INADDR_ANY);
Expand Down

0 comments on commit 270752a

Please sign in to comment.