diff --git a/LWIPInterface.cpp b/LWIPInterface.cpp index 55f65c821c..74cf9c1646 100644 --- a/LWIPInterface.cpp +++ b/LWIPInterface.cpp @@ -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;