From 193b540aa750446bf67dcad132773541214c296d Mon Sep 17 00:00:00 2001 From: brain Date: Tue, 31 Oct 2006 20:32:01 +0000 Subject: Socket error state stuff git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5607 e03df62e-2008-0410-955e-edbf42e46eb7 --- include/socketengine.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'include/socketengine.h') diff --git a/include/socketengine.h b/include/socketengine.h index a4628b648..9b3cdec64 100644 --- a/include/socketengine.h +++ b/include/socketengine.h @@ -26,11 +26,15 @@ /** Types of event an EventHandler may receive. * EVENT_READ is a readable file descriptor, * and EVENT_WRITE is a writeable file descriptor. + * EVENT_ERROR can always occur, and indicates + * a write error or read error on the socket, + * e.g. EOF condition or broken pipe. */ enum EventType { EVENT_READ = 0, - EVENT_WRITE = 1 + EVENT_WRITE = 1, + EVENT_ERROR = 2 }; class InspIRCd; @@ -127,7 +131,7 @@ class EventHandler : public Extensible * @param et either one of EVENT_READ for read events, * and EVENT_WRITE for write events. */ - virtual void HandleEvent(EventType et) = 0; + virtual void HandleEvent(EventType et, int errornum = 0) = 0; }; /** Provides basic file-descriptor-based I/O support. -- cgit v1.2.3