3#ifndef WIN32_LEAN_AND_MEAN
4#define WIN32_LEAN_AND_MEAN
6#define INPUT ARDUINO_WINDOWS_INPUT
13#define SHUT_RDWR SD_BOTH
18using SocketHandle = SOCKET;
19constexpr SocketHandle INVALID_SOCKET_HANDLE = INVALID_SOCKET;
20using SocketLength = int;
26 WSAStartup(MAKEWORD(2, 2), &data);
28 ~SocketRuntime() { WSACleanup(); }
31inline void ensureSocketRuntime() {
32 static SocketRuntime runtime;
36inline void closeSocket(SocketHandle socket) { closesocket(socket); }
37inline int socketLastError() {
return WSAGetLastError(); }
38inline bool socketWouldBlock(
int error) {
return error == WSAEWOULDBLOCK; }
39inline bool socketConnectionReset(
int error) {
return error == WSAECONNRESET; }
41inline bool setSocketNonBlocking(SocketHandle socket,
bool enabled =
true) {
42 u_long mode = enabled ? 1UL : 0UL;
43 return ioctlsocket(socket, FIONBIO, &mode) == 0;
We provide the WiFi class to simulate the Arduino WIFI. In in Linux we can expect that networking is ...
Definition CanMsg.cpp:31