summaryrefslogtreecommitdiff
path: root/include/inspsocket.h
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-08-02 10:26:21 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-08-02 10:26:21 +0000
commita54cfebb0434574f91acdcee07b89ea9f682d272 (patch)
treea6da7af4b41c72748628375b907204ffc0be8088 /include/inspsocket.h
parentb4f7f64413022c0cdd2900760748d4b24a8f68ec (diff)
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
Diffstat (limited to 'include/inspsocket.h')
-rw-r--r--include/inspsocket.h16
1 files changed, 4 insertions, 12 deletions
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<std::string> outbuffer;
@@ -163,8 +165,6 @@ protected:
bool BindAddr();
-public:
-
/**
* The default constructor does nothing
* and should not be used.
@@ -349,14 +349,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
* method is asyncronous.