@@ -1528,3 +1528,10 @@ BReactor * BSocket_Reactor (BSocket *bs)
return bs->bsys;
}
+
+int BSocket_SockFd (BSocket *bs)
+{
+ DebugObject_Access(&bs->d_obj);
+ return bs->socket;
+}
@@ -445,4 +445,12 @@ int BSocket_ConnectUnix (BSocket *bs, const char *path) WARN_UNUSED;
*/
BReactor * BSocket_Reactor (BSocket *bs);
+/**
+ * Returns the underlying file descriptor of the socket.
+ *
+ * @param bs the object
+ * @return file descriptor
+ */
+int BSocket_SockFd (BSocket *bs);
#endif