Add mbed helpers

This commit is contained in:
2025-01-23 13:34:38 -06:00
parent f235ab11f6
commit 1336d84006
11 changed files with 763 additions and 4 deletions

View File

@ -22,6 +22,7 @@ using HttpUtils = Tesses::Framework::Http::HttpUtils;
#else
extern "C" {
#include <netinet/in.h>
#include <netinet/tcp.h>
#include <sys/socket.h>
#include <arpa/inet.h>
#include <netdb.h>
@ -553,4 +554,10 @@ namespace Tesses::Framework::Streams {
if(this->owns && this->success)
NETWORK_CLOSE(this->sock);
}
void NetworkStream::SetNoDelay(bool noDelay)
{
int noDelay2 = noDelay;
NETWORK_SETSOCKOPT(this->sock, SOL_SOCKET, TCP_NODELAY, (const char*)&noDelay2,(socklen_t)sizeof(noDelay2));
}
}