diff options
author | Attila Molnar <attilamolnar@hush.com> | 2015-04-12 16:20:13 +0200 |
---|---|---|
committer | Attila Molnar <attilamolnar@hush.com> | 2015-04-12 16:20:13 +0200 |
commit | 612384b3d46d06eea6fd71ee6dc60471d0f9e3d1 (patch) | |
tree | f9926b5ca8841a30c3a16916116a7d4102e91c31 /src/socketengines/socketengine_select.cpp | |
parent | e3303330f8cc04121907715d789370f492878646 (diff) |
Dispatch EventHandler events to dedicated virtual functions
Remove enum EventType
Diffstat (limited to 'src/socketengines/socketengine_select.cpp')
-rw-r--r-- | src/socketengines/socketengine_select.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/socketengines/socketengine_select.cpp b/src/socketengines/socketengine_select.cpp index f44346ad8..6dfbae88e 100644 --- a/src/socketengines/socketengine_select.cpp +++ b/src/socketengines/socketengine_select.cpp @@ -141,7 +141,7 @@ int SocketEngine::DispatchEvents() if (getsockopt(i, SOL_SOCKET, SO_ERROR, (char*)&errcode, &codesize) < 0) errcode = errno; - ev->HandleEvent(EVENT_ERROR, errcode); + ev->OnEventHandlerError(errcode); continue; } @@ -149,7 +149,7 @@ int SocketEngine::DispatchEvents() { stats.ReadEvents++; ev->SetEventMask(ev->GetEventMask() & ~FD_READ_WILL_BLOCK); - ev->HandleEvent(EVENT_READ); + ev->OnEventHandlerRead(); if (ev != GetRef(i)) continue; } @@ -160,7 +160,7 @@ int SocketEngine::DispatchEvents() int newmask = (ev->GetEventMask() & ~(FD_WRITE_WILL_BLOCK | FD_WANT_SINGLE_WRITE)); SocketEngine::OnSetEvent(ev, ev->GetEventMask(), newmask); ev->SetEventMask(newmask); - ev->HandleEvent(EVENT_WRITE); + ev->OnEventHandlerWrite(); } } |