summaryrefslogtreecommitdiffhomepage
path: root/NetEx/NetSock.h
diff options
context:
space:
mode:
Diffstat (limited to 'NetEx/NetSock.h')
-rw-r--r--NetEx/NetSock.h19
1 files changed, 10 insertions, 9 deletions
diff --git a/NetEx/NetSock.h b/NetEx/NetSock.h
index 996972a..0df1cc6 100644
--- a/NetEx/NetSock.h
+++ b/NetEx/NetSock.h
@@ -3,25 +3,26 @@
Copyright (c) 2011-2012, Starshatter OpenSource Distribution Contributors
Copyright (c) 1997-2006, Destroyer Studios LLC.
- AUTHOR: John DiCamillo
+ AUTHOR: John DiCamillo
- OVERVIEW
- ========
- Network (IP) Socket
+ OVERVIEW
+ ========
+ Network (IP) Socket
*/
#ifndef NetSock_h
#define NetSock_h
-#include <windows.h>
+#include <cstdint>
+
#include "NetAddr.h"
#include "Text.h"
-// +-------------------------------------------------------------------+
#define NET_MAX_TIMEOUT 1e9
+
class NetSock
{
public:
@@ -53,15 +54,15 @@ public:
int set_timeout(int msecs);
int close();
- DWORD max_packet_size() const;
+ std::uint32_t max_packet_size() const;
bool is_stream() const { return stream; }
bool is_closed() const { return closed; }
int status() const { return stat; }
private:
- NetSock(SOCKET s, bool stream);
+ NetSock(int sock, bool stream);
- SOCKET s;
+ int s;
bool stream;
bool closed;
int stat;