From d0d36795e807cf72295c6e73813e0c2daa0a71e7 Mon Sep 17 00:00:00 2001 From: brain Date: Thu, 23 Aug 2007 22:06:04 +0000 Subject: Craquity craq De-craq! This is probably broken on windows, do not attempt to use there yet unless you like broken stuff. Cant say for sure as i havent even tried to build yet and most likely wont tonight. --- Abstract most of the berkely socket API out into SocketEngine derived classes. SocketEngine base class implements standard berkely sockets that 'real mens systems' like linux and freebsd have. For socketengine_iocp we implement the windows specific nonesense like the special things needed for udp and accept (ick). All this to eliminate a bunch of ifdefs. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7810 e03df62e-2008-0410-955e-edbf42e46eb7 --- include/socketengine_iocp.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'include/socketengine_iocp.h') diff --git a/include/socketengine_iocp.h b/include/socketengine_iocp.h index ad3e58157..e45f8e726 100644 --- a/include/socketengine_iocp.h +++ b/include/socketengine_iocp.h @@ -6,7 +6,7 @@ * See: http://www.inspircd.org/wiki/index.php/Credits * * This program is free but copyrighted software; see - * the file COPYING for details. + * the file COPYING for details. * * --------------------------------------------------- */ @@ -212,6 +212,16 @@ public: EventHandler* GetIntRef(int fd); bool BoundsCheckFd(EventHandler* eh); + + virtual int Accept(EventHandler* fd, sockaddr *addr, socklen_t *addrlen); + + virtual int RecvFrom(EventHandler* fd, void *buf, size_t len, int flags, struct sockaddr *from, socklen_t *fromlen); + + virtual int Blocking(int fd); + + virtual int NonBlocking(int fd); + + virtual int GetSockName(EventHandler* fd, sockaddr *name, socklen_t* name); }; /** Creates a SocketEngine -- cgit v1.2.3