X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=include%2Fsocket.h;h=91a10d1f9e3c7a71f042a21729a00ed03dfd7f82;hb=c2a3ebea46f3527e0680f1258725f95ff13f0880;hp=b012cf62a1fcd0bcc8ed4b3967e2290fa6ef4918;hpb=9fad3ecb9215a0034bf407f192926b04cb5efaed;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/include/socket.h b/include/socket.h index b012cf62a..91a10d1f9 100644 --- a/include/socket.h +++ b/include/socket.h @@ -2,7 +2,7 @@ * | Inspire Internet Relay Chat Daemon | * +------------------------------------+ * - * InspIRCd: (C) 2002-2009 InspIRCd Development Team + * InspIRCd: (C) 2002-2010 InspIRCd Development Team * See: http://wiki.inspircd.org/Credits * * This program is free but copyrighted software; see @@ -34,7 +34,6 @@ #endif #include -#include "socketengine.h" /* Contains irc-specific definitions */ namespace irc @@ -96,13 +95,6 @@ namespace irc */ CoreExport bool MatchCIDR(const std::string &address, const std::string &cidr_mask, bool match_with_username); - /** 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 - * descriptors) - */ - CoreExport int OpenTCPSocket(const std::string& addr, int socktype = SOCK_STREAM); - /** Return the size of the structure for syscall passing */ inline int sa_size(const irc::sockets::sockaddrs& sa) { return sa.sa_size(); } @@ -131,6 +123,7 @@ namespace irc } } +#include "socketengine.h" /** This class handles incoming connections on client ports. * It will create a new User for every valid connection * and assign it a file descriptor. @@ -145,7 +138,7 @@ class CoreExport ListenSocket : public EventHandler std::string bind_desc; /** Create a new listening socket */ - ListenSocket(ConfigTag* tag, const std::string& addr, int port); + ListenSocket(ConfigTag* tag, const irc::sockets::sockaddrs& bind_to); /** Handle an I/O event */ void HandleEvent(EventType et, int errornum = 0);