]> git.tdb.fi Git - libs/net.git/commitdiff
Add method to query bound status of a socket
authorMikko Rasa <tdb@tdb.fi>
Thu, 24 Jan 2019 01:21:23 +0000 (03:21 +0200)
committerMikko Rasa <tdb@tdb.fi>
Thu, 24 Jan 2019 01:21:23 +0000 (03:21 +0200)
source/net/socket.h

index fe5c605049f84ab8396e11f49d0ceda1a3fe032c..bca58fad4d98d191b7aed753ac88eff493ca3359 100644 (file)
@@ -50,6 +50,7 @@ public:
        users of the address. */
        void bind(const SockAddr &);
 
+       bool is_bound() const { return local_addr; }
        const SockAddr &get_local_address() const;
 
        void set_timeout(const Time::TimeDelta &);