From f5754cbc9c77387adafc6c58b5d46ffa9b5facd3 Mon Sep 17 00:00:00 2001 From: brain Date: Fri, 16 Dec 2005 12:32:01 +0000 Subject: Moved SocketEngine* SE into InspIRCd class git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2527 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/socket.cpp | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'src/socket.cpp') 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: -- cgit v1.2.3