From 3c180b3f30515386713dc00c8cb403ea1c8e8e0c Mon Sep 17 00:00:00 2001 From: geky Date: Wed, 8 Jun 2016 20:06:52 +0100 Subject: [PATCH] Implement the NSAPI_KEEPINTVL in the LWIPInterface --- net/LWIPInterface/LWIPInterface.cpp | 7 +++++++ 1 file changed, 7 insertions(+) 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;