diff --git a/net/LWIPInterface/LWIPInterface.cpp b/net/LWIPInterface/LWIPInterface.cpp index 21b14cba0e..55f65c821c 100644 --- a/net/LWIPInterface/LWIPInterface.cpp +++ b/net/LWIPInterface/LWIPInterface.cpp @@ -555,6 +555,13 @@ int LWIPInterface::setsockopt(void *handle, int level, int optname, const void * } s->tcp->so_options |= SOF_KEEPALIVE; + return 0; + + case NSAPI_KEEPINTVL: + if (optlen != sizeof(int) || s->proto != NSAPI_TCP) { + return NSAPI_ERROR_UNSUPPORTED; + } + s->tcp->keep_intvl = *(int*)optval; return 0;