diff options
author | sfan5 <sfan5@live.de> | 2021-12-29 23:01:26 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-29 23:01:26 +0100 |
commit | 0ea8df4d64959a7c7ec4e55b4895d6b16dad3000 (patch) | |
tree | 3f1e0cf533142974d2d294f890396992bfdcbe02 /src/network/socket.h | |
parent | 05573d6d8d9e5a756ab1b03b159b127144f8e775 (diff) | |
download | minetest-0ea8df4d64959a7c7ec4e55b4895d6b16dad3000.tar.gz minetest-0ea8df4d64959a7c7ec4e55b4895d6b16dad3000.tar.bz2 minetest-0ea8df4d64959a7c7ec4e55b4895d6b16dad3000.zip |
Socket-related cleanups
Improve error handling on Windows and reduce the size of the `Address` class
Diffstat (limited to 'src/network/socket.h')
-rw-r--r-- | src/network/socket.h | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/src/network/socket.h b/src/network/socket.h index e0e76f4c2..d34186b44 100644 --- a/src/network/socket.h +++ b/src/network/socket.h @@ -19,18 +19,6 @@ with this program; if not, write to the Free Software Foundation, Inc., #pragma once -#ifdef _WIN32 -#ifndef _WIN32_WINNT -#define _WIN32_WINNT 0x0501 -#endif -#include <windows.h> -#include <winsock2.h> -#include <ws2tcpip.h> -#else -#include <sys/socket.h> -#include <netinet/in.h> -#endif - #include <ostream> #include <cstring> #include "address.h" @@ -53,8 +41,6 @@ public: bool init(bool ipv6, bool noExceptions = false); - // void Close(); - // bool IsOpen(); void Send(const Address &destination, const void *data, int size); // Returns -1 if there is no data int Receive(Address &sender, void *data, int size); |