sources/network/udpsocket.h

changeset 10
3874575d924d
parent 9
e7a09ceb4505
child 73
07dda51a7a8e
--- a/sources/network/udpsocket.h	Thu Dec 11 16:17:35 2014 +0200
+++ b/sources/network/udpsocket.h	Fri Dec 12 00:55:51 2014 +0200
@@ -49,13 +49,31 @@
 	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;
+	       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;
 
 private:
 	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;
+}

mercurial