summaryrefslogtreecommitdiff
path: root/src/socket.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-12-16 12:32:01 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-12-16 12:32:01 +0000
commitf5754cbc9c77387adafc6c58b5d46ffa9b5facd3 (patch)
tree1e69c6fc7ddc116804557222d526b5e76fcba9bf /src/socket.cpp
parentb593267ff17558906cff94e5b30ada977364294a (diff)
Moved SocketEngine* SE into InspIRCd class
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2527 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/socket.cpp')
-rw-r--r--src/socket.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/socket.cpp b/src/socket.cpp
index 561435a2a..6d065e835 100644
--- a/src/socket.cpp
+++ b/src/socket.cpp
@@ -36,10 +36,8 @@ using namespace std;
#include "helperfuncs.h"
#include "socketengine.h"
-extern SocketEngine* SE;
-extern int boundPortCount;
-extern int openSockfd[MAXSOCKS];
+extern InspIRCd* ServerInstance;
extern time_t TIME;
InspSocket* socket_ref[65535];
@@ -54,7 +52,7 @@ InspSocket::InspSocket(int newfd, char* ip)
this->fd = newfd;
this->state = I_CONNECTED;
this->IP = ip;
- SE->AddFd(this->fd,true,X_ESTAB_MODULE);
+ ServerInstance->SE->AddFd(this->fd,true,X_ESTAB_MODULE);
socket_ref[this->fd] = this;
}
@@ -83,7 +81,7 @@ InspSocket::InspSocket(std::string host, int port, bool listening, unsigned long
else
{
this->state = I_LISTENING;
- SE->AddFd(this->fd,true,X_ESTAB_MODULE);
+ ServerInstance->SE->AddFd(this->fd,true,X_ESTAB_MODULE);
socket_ref[this->fd] = this;
log(DEBUG,"New socket now in I_LISTENING state");
return;
@@ -131,7 +129,7 @@ InspSocket::InspSocket(std::string host, int port, bool listening, unsigned long
}
}
this->state = I_CONNECTING;
- SE->AddFd(this->fd,false,X_ESTAB_MODULE);
+ ServerInstance->SE->AddFd(this->fd,false,X_ESTAB_MODULE);
socket_ref[this->fd] = this;
return;
}
@@ -226,8 +224,8 @@ bool InspSocket::Poll()
/* Our socket was in write-state, so delete it and re-add it
* in read-state.
*/
- SE->DelFd(this->fd);
- SE->AddFd(this->fd,true,X_ESTAB_MODULE);
+ ServerInstance->SE->DelFd(this->fd);
+ ServerInstance->SE->AddFd(this->fd,true,X_ESTAB_MODULE);
return this->OnConnected();
break;
case I_LISTENING: