sources/network/udpsocket.h

changeset 88
08ccaf26cffd
parent 73
07dda51a7a8e
child 109
e4966d7e615d
--- a/sources/network/udpsocket.h	Thu Jul 23 00:16:47 2015 +0300
+++ b/sources/network/udpsocket.h	Thu Jul 23 01:52:04 2015 +0300
@@ -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