diff -r a76af67a3a4b -r 7b156b764d11 sources/network/udpsocket.h --- 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