diff options
| author | Adam <Adam@anope.org> | 2010-09-10 20:31:31 -0400 |
|---|---|---|
| committer | Adam <Adam@anope.org> | 2010-09-10 20:31:31 -0400 |
| commit | f00e76d30a86acf0f18bcde5647eedd50de50569 (patch) | |
| tree | 04af81a883ea6e71ec36e35a2822487c7f8192c6 /include/sockets.h | |
| parent | 9eb7562bee7f2a52cf91b0ab0ebc10351f2a46f2 (diff) | |
Added Anope::CurTime to keep us from calling time() everywhere
Diffstat (limited to 'include/sockets.h')
| -rw-r--r-- | include/sockets.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/sockets.h b/include/sockets.h index 772a08a65..6caeea19c 100644 --- a/include/sockets.h +++ b/include/sockets.h @@ -60,8 +60,19 @@ union CoreExport sockaddrs /* The same as above but not */ inline bool operator!=(const sockaddrs &other) const { return !(*this == other); } + /** The equivalent of inet_pton + * @param type AF_INET or AF_INET6 + * @param address The address to place in the sockaddr structures + * @param pport An option port to include in the sockaddr structures + * @throws A socket exception if given invalid IPs + */ void pton(int type, const Anope::string &address, int pport = 0); + /** The equivalent of inet_ntop + * @param type AF_INET or AF_INET6 + * @param address The in_addr or in_addr6 structure + * @throws A socket exception if given an invalid structure + */ void ntop(int type, const void *src); }; |
