]> git.tdb.fi Git - libs/net.git/blobdiff - source/socket.cpp
Move some functions around a bit
[libs/net.git] / source / socket.cpp
index b5a6ec856ed615b9e3a8db920b4950f1a657917b..2bfdecc5b07794976ddaab3d5d528081c492d9a7 100644 (file)
@@ -117,6 +117,13 @@ void Socket::bind(const SockAddr &addr)
        local_addr = addr.copy();
 }
 
+const SockAddr &Socket::get_local_address() const
+{
+       if(local_addr==0)
+               throw bad_socket_state("not bound");
+       return *local_addr;
+}
+
 void Socket::set_timeout(const Time::TimeDelta &timeout)
 {
 #ifndef WIN32
@@ -130,13 +137,6 @@ void Socket::set_timeout(const Time::TimeDelta &timeout)
 #endif
 }
 
-const SockAddr &Socket::get_local_address() const
-{
-       if(local_addr==0)
-               throw bad_socket_state("not bound");
-       return *local_addr;
-}
-
 int Socket::set_option(int level, int optname, const void *optval, socklen_t optlen)
 {
 #ifdef WIN32