Added NSAPI_KEEPIDLE option to the socket API and LWIPInterface

pull/2231/head
Christopher Haster 2016-06-07 20:38:23 -05:00
parent 864c73b64a
commit 53349343e9
1 changed files with 8 additions and 0 deletions

View File

@ -557,6 +557,14 @@ int LWIPInterface::setsockopt(void *handle, int level, int optname, const void *
s->tcp->so_options |= SOF_KEEPALIVE;
return 0;
case NSAPI_KEEPIDLE:
if (optlen != sizeof(int) || s->proto != NSAPI_TCP) {
return NSAPI_ERROR_UNSUPPORTED;
}
s->tcp->keep_idle = *(int*)optval;
return 0;
case NSAPI_KEEPINTVL:
if (optlen != sizeof(int) || s->proto != NSAPI_TCP) {
return NSAPI_ERROR_UNSUPPORTED;