From a54cfebb0434574f91acdcee07b89ea9f682d272 Mon Sep 17 00:00:00 2001 From: brain Date: Wed, 2 Aug 2006 10:26:21 +0000 Subject: InspSocket no longer resolves hosts. InspSocket::DoResolve() and the stuff that calls it is gone, if you pass InspSocket an invalid ip, it will bail during its connect. You must now use Resolver classes to resolve hostnames into IP addresses, if you wish to do this. Currently, only one non-extra module does this, see class ServernameResolver within m_spanningtree git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4634 e03df62e-2008-0410-955e-edbf42e46eb7 --- include/inspsocket.h | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) (limited to 'include') diff --git a/include/inspsocket.h b/include/inspsocket.h index 1b9947ef9..077f20a65 100644 --- a/include/inspsocket.h +++ b/include/inspsocket.h @@ -27,13 +27,15 @@ /** * States which a socket may be in */ -enum InspSocketState { I_DISCONNECTED, I_RESOLVING, I_CONNECTING, I_CONNECTED, I_LISTENING, I_ERROR }; +enum InspSocketState { I_DISCONNECTED, I_CONNECTING, I_CONNECTED, I_LISTENING, I_ERROR }; /** * Error types which a socket may exhibit */ enum InspSocketError { I_ERR_TIMEOUT, I_ERR_SOCKET, I_ERR_CONNECT, I_ERR_BIND, I_ERR_RESOLVE, I_ERR_WRITE }; +class InspSocket; + /** * InspSocket is an extendable socket class which modules * can use for TCP socket support. It is fully integrated @@ -47,7 +49,7 @@ enum InspSocketError { I_ERR_TIMEOUT, I_ERR_SOCKET, I_ERR_CONNECT, I_ERR_BIND, I */ class InspSocket : public Extensible { -protected: + public: std::deque outbuffer; @@ -163,8 +165,6 @@ protected: bool BindAddr(); -public: - /** * The default constructor does nothing * and should not be used. @@ -348,14 +348,6 @@ public: */ virtual ~InspSocket(); - /** - * This method attempts to resolve the hostname, - * if a hostname is given and not an IP, - * before a connection can occur. This method is - * asyncronous. - */ - virtual bool DoResolve(); - /** * This method attempts to connect to a hostname. * This only occurs on a non-listening socket. This -- cgit v1.3.1-10-gc9f91