| 3314 | } |
| 3315 | |
| 3316 | static 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 | |
| 3343 | static bool setKeepAlive(SOCKET s) |
| 3344 | { |
no test coverage detected