diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-08-23 22:06:04 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-08-23 22:06:04 +0000 |
commit | d0d36795e807cf72295c6e73813e0c2daa0a71e7 (patch) | |
tree | 09ae4d94ed7b6f3038d2579037fd2c7ee93a6657 /include/socket.h | |
parent | 61816ef0dd848225e9ec1c21c3c7a3bc03a34da9 (diff) |
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
Diffstat (limited to 'include/socket.h')
-rw-r--r-- | include/socket.h | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/include/socket.h b/include/socket.h index 57725b95f..861acc1f1 100644 --- a/include/socket.h +++ b/include/socket.h @@ -37,23 +37,6 @@ #include "inspircd_config.h" #include "socketengine.h" -/* Accept Define */ -#ifdef CONFIG_USE_IOCP -/* IOCP wrapper for accept() */ -#define _accept(s, addr, addrlen) __accept_socket(s, addr, addrlen, m_acceptEvent) -/* IOCP wrapper for getsockname() */ -#define _getsockname(fd, sockptr, socklen) __getsockname(fd, sockptr, socklen, m_acceptEvent) -/* IOCP wrapper for recvfrom() */ -#define _recvfrom(s, buf, len, flags, from, fromlen) __recvfrom(s, buf, len, flags, from, fromlen, ((IOCPEngine*)ServerInstance->SE)->udp_ov) -#else -/* No wrapper for recvfrom() */ -#define _recvfrom recvfrom -/* No wrapper for accept() */ -#define _accept accept -/* No wrapper for getsockname() */ -#define _getsockname getsockname -#endif - /* Contains irc-specific definitions */ namespace irc { @@ -148,16 +131,6 @@ namespace irc */ CoreExport int insp_aton(const char* a, insp_inaddr* n); - /** Make a socket file descriptor a blocking socket - * @param s A valid file descriptor - */ - CoreExport void Blocking(int s); - - /** Make a socket file descriptor into a nonblocking socket - * @param s A valid file descriptor - */ - CoreExport void NonBlocking(int s); - /** Create a new valid file descriptor using socket() * @return On return this function will return a value >= 0 for success, * or a negative value upon failure (negative values are invalid file |