diff options
| author | 2008-04-02 17:08:09 +0000 | |
|---|---|---|
| committer | 2008-04-02 17:08:09 +0000 | |
| commit | 2db77cda56947d4ee0f913c8082f6607855ca713 (patch) | |
| tree | f7f83c80f62adc4e3eb0f9f3b680229466c4352e /src/socketengines/socketengine_iocp.cpp | |
| parent | Fix all this crap - it actually works now (we pray..) (diff) | |
| download | inspircd++-2db77cda56947d4ee0f913c8082f6607855ca713.tar.gz inspircd++-2db77cda56947d4ee0f913c8082f6607855ca713.tar.bz2 inspircd++-2db77cda56947d4ee0f913c8082f6607855ca713.zip | |
Automatic detection and allocation of max fds. No longer needs recompile to change, just adjust it in your kernel or whatever and restart insp.
Please note that select and iocp socket engines do not support detection and are always set to FD_SETSIZE and 10240 descriptors respectively.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9263 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/socketengines/socketengine_iocp.cpp')
| -rw-r--r-- | src/socketengines/socketengine_iocp.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/socketengines/socketengine_iocp.cpp b/src/socketengines/socketengine_iocp.cpp index 5bc1faed4..b27f96035 100644 --- a/src/socketengines/socketengine_iocp.cpp +++ b/src/socketengines/socketengine_iocp.cpp @@ -32,6 +32,8 @@ IOCPEngine::IOCPEngine(InspIRCd * Instance) : SocketEngine(Instance) /* Null variables out. */ CurrentSetSize = 0; EngineHandle = 0; + MAX_DESCRIPTORS = 10240; + ref = new EventHandler* [10240]; memset(ref, 0, sizeof(EventHandler*) * MAX_DESCRIPTORS); } @@ -40,6 +42,7 @@ IOCPEngine::~IOCPEngine() /* Clean up winsock and close completion port */ CloseHandle(m_completionPort); WSACleanup(); + delete[] ref; } bool IOCPEngine::AddFd(EventHandler* eh) |
