summaryrefslogtreecommitdiff
path: root/include/socketengine.h
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-10-31 20:32:01 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-10-31 20:32:01 +0000
commit193b540aa750446bf67dcad132773541214c296d (patch)
tree08102297f03b3a1d7e064ec5c3077774106437de /include/socketengine.h
parent4bb033449de57d7d2ac873bc70631b43ab7ce3d9 (diff)
Socket error state stuff
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5607 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'include/socketengine.h')
-rw-r--r--include/socketengine.h8
1 files changed, 6 insertions, 2 deletions
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.