sources/network/udpsocket.h

branch
protocol5
changeset 106
7b156b764d11
parent 88
08ccaf26cffd
child 109
e4966d7e615d
--- a/sources/network/udpsocket.h	Sat Jan 09 02:35:00 2016 +0200
+++ b/sources/network/udpsocket.h	Sat Jan 09 17:41:21 2016 +0200
@@ -32,6 +32,7 @@
 #include "../main.h"
 #include "ipaddress.h"
 #include "bytestream.h"
+BEGIN_ZFC_NAMESPACE
 
 enum { MAX_DATAGRAM_LENGTH = 5120 };
 
@@ -49,31 +50,19 @@
 	UDPSocket();
 	virtual ~UDPSocket();
 
-	       METHOD bind (unsigned short port) -> bool;
-	       METHOD read (Datagram& datagram) -> bool;
-	       METHOD send (const IPAddress& address, const Bytestream& data) -> bool;
-	       METHOD set_blocking (bool a) -> bool;
-	inline METHOD error_string() -> const String&;
-	inline METHOD file_descriptor() -> int;
+	bool bind (unsigned short port);
+	bool read (Datagram& datagram);
+	bool send (const IPAddress& address, const Bytestream& data);
+	bool set_blocking (bool a);
+	const String& error_string() const { return m_error; }
+	int file_descriptor() const { return m_socket; }
 
 private:
+	static char HuffmanBuffer[131072];
+
 	IPAddress m_addr;
 	String m_error;
 	int m_socket;
 };
 
-// -------------------------------------------------------------------------------------------------
-//
-inline METHOD
-UDPSocket::file_descriptor() -> int
-{
-	return m_socket;
-}
-
-// -------------------------------------------------------------------------------------------------
-//
-inline METHOD
-UDPSocket::error_string() -> const String&
-{
-	return m_error;
-}
+END_ZFC_NAMESPACE
\ No newline at end of file

mercurial