diff options
author | Attila Molnar <attilamolnar@hush.com> | 2014-02-08 13:10:09 +0100 |
---|---|---|
committer | Attila Molnar <attilamolnar@hush.com> | 2014-02-08 13:10:09 +0100 |
commit | 2cf4b614e6c23bfc6d47da2ec4b1932ee2f62cf0 (patch) | |
tree | 68b62cf115b9716cb17adbe5b598878c8c438c78 /src/threadengines | |
parent | 5b6ae9c5427b32f5bacba592fc08e1f70009aee4 (diff) |
Change SocketEngine functions that do not require an instance to be static
Diffstat (limited to 'src/threadengines')
-rw-r--r-- | src/threadengines/threadengine_pthread.cpp | 6 | ||||
-rw-r--r-- | src/threadengines/threadengine_win32.cpp | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/threadengines/threadengine_pthread.cpp b/src/threadengines/threadengine_pthread.cpp index e16e401f3..ebd11d487 100644 --- a/src/threadengines/threadengine_pthread.cpp +++ b/src/threadengines/threadengine_pthread.cpp @@ -81,7 +81,7 @@ class ThreadSignalSocket : public EventHandler ~ThreadSignalSocket() { ServerInstance->SE->DelFd(this); - ServerInstance->SE->Close(GetFd()); + SocketEngine::Close(GetFd()); } void Notify() @@ -123,7 +123,7 @@ class ThreadSignalSocket : public EventHandler parent(p), send_fd(sendfd) { SetFd(recvfd); - ServerInstance->SE->NonBlocking(fd); + SocketEngine::NonBlocking(fd); ServerInstance->SE->AddFd(this, FD_WANT_FAST_READ | FD_WANT_NO_WRITE); } @@ -131,7 +131,7 @@ class ThreadSignalSocket : public EventHandler { close(send_fd); ServerInstance->SE->DelFd(this); - ServerInstance->SE->Close(GetFd()); + SocketEngine::Close(GetFd()); } void Notify() diff --git a/src/threadengines/threadengine_win32.cpp b/src/threadengines/threadengine_win32.cpp index ea37892f8..c3a844a74 100644 --- a/src/threadengines/threadengine_win32.cpp +++ b/src/threadengines/threadengine_win32.cpp @@ -94,20 +94,20 @@ SocketThread::SocketThread() if (!ServerInstance->BindSocket(listenFD, 0, "127.0.0.1", true)) throw CoreException("Could not create ITC pipe"); - ServerInstance->SE->NonBlocking(connFD); + SocketEngine::NonBlocking(connFD); struct sockaddr_in addr; socklen_t sz = sizeof(addr); getsockname(listenFD, reinterpret_cast<struct sockaddr*>(&addr), &sz); connect(connFD, reinterpret_cast<struct sockaddr*>(&addr), sz); - ServerInstance->SE->Blocking(listenFD); + SocketEngine::Blocking(listenFD); int nfd = accept(listenFD, reinterpret_cast<struct sockaddr*>(&addr), &sz); if (nfd < 0) throw CoreException("Could not create ITC pipe"); new ThreadSignalSocket(this, nfd); closesocket(listenFD); - ServerInstance->SE->Blocking(connFD); + SocketEngine::Blocking(connFD); this->signal.connFD = connFD; } |