MCPcopy Create free account
hub / github.com/davisking/dlib / disable_nagle

Method disable_nagle

dlib/sockets/sockets_kernel_1.cpp:292–302  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

290// ----------------------------------------------------------------------------------------
291
292 int connection::
293 disable_nagle()
294 {
295 int flag = 1;
296 int status = setsockopt( connection_socket, IPPROTO_TCP, TCP_NODELAY, (char *)&flag, sizeof(flag) );
297
298 if (status == SOCKET_ERROR)
299 return OTHER_ERROR;
300 else
301 return 0;
302 }
303
304// ----------------------------------------------------------------------------------------
305

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected