MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / setNoNagleOption

Function setNoNagleOption

src/remote/inet.cpp:3316–3341  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3314}
3315
3316static bool setNoNagleOption(rem_port* port)
3317{
3318/**************************************
3319 *
3320 * s e t N o N a g l e O p t i o n
3321 *
3322 **************************************
3323 *
3324 * Functional description
3325 * Set TCP_NODELAY, return false
3326 * in case of unexpected error
3327 *
3328 **************************************/
3329 if (port->getPortConfig()->getTcpNoNagle())
3330 {
3331 int optval = TRUE;
3332 int n = setsockopt(port->port_handle, IPPROTO_TCP, TCP_NODELAY,
3333 (SCHAR*) &optval, sizeof(optval));
3334
3335 if (n == -1)
3336 {
3337 return false;
3338 }
3339 }
3340 return true;
3341}
3342
3343static bool setKeepAlive(SOCKET s)
3344{

Callers 4

INET_connectFunction · 0.85
listener_socketFunction · 0.85
INET_reconnectFunction · 0.85
INET_serverFunction · 0.85

Calls 1

getPortConfigMethod · 0.80

Tested by

no test coverage detected