diff options
Diffstat (limited to 'src/SocketCore.h')
| -rw-r--r-- | src/SocketCore.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/SocketCore.h b/src/SocketCore.h index 67585bc3..7de5a0eb 100644 --- a/src/SocketCore.h +++ b/src/SocketCore.h @@ -160,6 +160,21 @@ public: void getAddrInfo(std::pair<std::string, uint16_t>& addrinfo) const; /** + * Stores address of this socket to sockaddr. len must be + * initialized to the size of sockaddr. On success, address data is + * stored in sockaddr and actual size of address structure is stored + * in len. + */ + void getAddrInfo + (struct sockaddr_storage& sockaddr, socklen_t& len) const; + + /** + * Returns address family of this socket. + * The socket must be connected or bounded to address. + */ + int getAddressFamily() const; + + /** * Stores peer's address and port to peerinfo. * @param peerinfo placeholder to store peer's address and port. */ |
