diff options
author | Sadie Powell <sadie@witchery.services> | 2022-12-17 12:24:32 +0000 |
---|---|---|
committer | Sadie Powell <sadie@witchery.services> | 2022-12-17 12:39:48 +0000 |
commit | f6e5e6a2b4dd3f5e6e9e5c152dd92fcd9bc440f2 (patch) | |
tree | b61984b694e0d89f3c627e3fdeba502f8d048389 /include/sockets.h | |
parent | dfdcd3021a482182827ba00782acd5a53442d21a (diff) |
Add sockaddrs::str to stringify a sockaddrs properly.
Also clean up the socket code slightly.
Diffstat (limited to 'include/sockets.h')
-rw-r--r-- | include/sockets.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/include/sockets.h b/include/sockets.h index 641800b6d..ec84bc5eb 100644 --- a/include/sockets.h +++ b/include/sockets.h @@ -63,6 +63,11 @@ union CoreExport sockaddrs */ Anope::string addr() const; + /** Gets the endpoint represented by this addr. + * @return The endpoint. + */ + Anope::string str() const; + /** Get the reverse address represented by this addr * @return The reverse address */ @@ -232,7 +237,7 @@ class CoreExport Socket * @param family The family of the socket * @param type The socket type, defaults to SOCK_STREAM */ - Socket(int sock, bool family = AF_INET, int type = SOCK_STREAM); + Socket(int sock, int family = AF_INET, int type = SOCK_STREAM); /** Destructor, closes the socket and removes it from the engine */ |