| 3341 | } |
| 3342 | |
| 3343 | static bool setKeepAlive(SOCKET s) |
| 3344 | { |
| 3345 | /************************************** |
| 3346 | * |
| 3347 | * s e t K e e p A l i v e |
| 3348 | * |
| 3349 | ************************************** |
| 3350 | * |
| 3351 | * Functional description |
| 3352 | * Set SO_KEEPALIVE, return false |
| 3353 | * in case of unexpected error |
| 3354 | * |
| 3355 | **************************************/ |
| 3356 | int optval = 1; |
| 3357 | int n = setsockopt(s, SOL_SOCKET, SO_KEEPALIVE, |
| 3358 | (SCHAR*) &optval, sizeof(optval)); |
| 3359 | return n != -1; |
| 3360 | } |
| 3361 | |
| 3362 | void setStopMainThread(FPTR_INT func) |
| 3363 | { |
no outgoing calls
no test coverage detected