summaryrefslogtreecommitdiff
path: root/src/listensocket.cpp
AgeCommit message (Collapse)Author
2014-02-09Call DelFd() and SetFd(-1) from SocketEngine::Close(EventHandler*)Attila Molnar
2014-02-08Change all socketengine methods to be staticAttila Molnar
2014-02-08Change SocketEngine functions that do not require an instance to be staticAttila Molnar
2014-01-22Split IOHook into IOHook and IOHookProviderAttila Molnar
Create one IOHook instance for each hooked socket which contains all the hook specific data and read/write/close functions, removing the need for the "issl_session" array in SSL modules. Register instances of the IOHookProvider class in the core and use them to create specialized IOHook instances (OnConnect/OnAccept). Remove the OnHookIO hook, add a dynamic reference to ListenSocket that points to the hook provider (if any) to use for incoming connections on that socket. For outgoing connections modules still have to find the IOHookProvider they want to use themselves but instead of calling AddIOHook(hookprov), now they have to call IOHookProvider::OnConnect() after the connection has been established.
2013-12-15Remove some pointless code:Peter Powell
- Remove the CHARSET entry from ISUPPORT. CHARSET was removed in draft-brocklesby-irc-isupport-03 and we always used the default value anyway. This has also been removed in the latest version of Charybdis. - Remove irc::sockets::satouser. This helper method was longer than the code it replaced.
2013-08-27Fix Windows build and a few more problemsattilamolnar
2013-07-16Use the preprocessor to check for TCP deferring support.Peter Powell
2013-06-06Merge insp20attilamolnar
2013-06-03Added option for using TCP_DEFER_ACCEPT. Prevents the connection from being ↵Daniel Vassdal
handed over to the daemon before data is ready from the client.
2013-05-19Fix spacing in calls to LogManager::Log.Peter Powell
2013-05-02Fix disabling IPV6_V6ONLY on sockets, issue #511Adam
2013-04-28Merge insp20attilamolnar
2013-04-16Close listening sockets regardless of the return value of shutdown()attilamolnar
2013-04-12Add LOG_ prefix to the log level enum values.Peter Powell
2012-08-20listensocket: Fix the two aliasing warningsChrisTX
m_ssl_gnutls: Fix three warnings: 1. libgcrypt will emit a warning to stdout during runtime that it has not been properly initialized 2. Resolve a warning about invalid narrowing inside a { } block. This is not valid as of C++11. 3. Resolve a warning about a wrong format specifier being used
2012-04-19Replace copyright headers with headers granting specific authors copyrightRobby-
2011-04-10Fixed Windows build on VS 2010Adam
2010-04-14Add IPV6_V6ONLY supportDaniel De Graaf
2010-03-02Fix m_ident deleting sockets that are still in usedanieldg
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12586 e03df62e-2008-0410-955e-edbf42e46eb7
2010-02-23Replace #define IPV6 with <config defaultbind="ipv6">, and autodetect if not ↵danieldg
specified git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12550 e03df62e-2008-0410-955e-edbf42e46eb7
2010-01-22Fall back to copying bind IP if getsockname() fails, as it apparently can on ↵danieldg
Windows git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12314 e03df62e-2008-0410-955e-edbf42e46eb7
2010-01-21Remove unneeded save of errnodanieldg
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12309 e03df62e-2008-0410-955e-edbf42e46eb7
2010-01-11...because every now and again, i have to do a massive commit.brain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12248 e03df62e-2008-0410-955e-edbf42e46eb7
2009-11-13Get rid of socklen_t parameter to Bind, we are using C++ here and can do it ↵danieldg
other ways git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12129 e03df62e-2008-0410-955e-edbf42e46eb7
2009-10-24Get rid of OpenTCPSocketdanieldg
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11969 e03df62e-2008-0410-955e-edbf42e46eb7
2009-10-24Get rid of ModePairdanieldg
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11963 e03df62e-2008-0410-955e-edbf42e46eb7
2009-10-23Change to <type:vhost> and <oper:vhost> because <oper:host> is taken.danieldg
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11957 e03df62e-2008-0410-955e-edbf42e46eb7
2009-10-22Make irc::sockets::* parameters consistent, add irc::sockets::maskdanieldg
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11953 e03df62e-2008-0410-955e-edbf42e46eb7
2009-10-21Kill ListenSocketBase, use OnAcceptConnection for all new connectionsdanieldg
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11950 e03df62e-2008-0410-955e-edbf42e46eb7
2009-10-09Add server ports to ServerInstance->ports, enable SSL on them using OnHookIOdanieldg
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11810 e03df62e-2008-0410-955e-edbf42e46eb7
2009-10-03Fix crash due to null address in DNSdanieldg
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11797 e03df62e-2008-0410-955e-edbf42e46eb7
2009-09-26Remove InspIRCd* parameters and fieldsdanieldg
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11763 e03df62e-2008-0410-955e-edbf42e46eb7
2009-09-26Clean up SocketEngine interface to allow edge-triggered I/O and sockets that ↵danieldg
do not force readability. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11760 e03df62e-2008-0410-955e-edbf42e46eb7
2009-09-02Remove duplicated address conversion from InspIRCd::BindSocket, fix FD leak ↵danieldg
in listensocket git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11632 e03df62e-2008-0410-955e-edbf42e46eb7
2009-09-02Use a set to mark client SSL ports rather than going by textual IP/port pairsdanieldg
This theoretically speeds up accepting connections. Visible changes are proper IPv6 port text in 005 output and no possibility of incorrect SSL on addresses that mismatch an incoming port (possible with IPv4 wildcard SSL and IPv6 plaintext on the same port, not that anyone would do such a thing). Bind ports also now tell which SSL module they use in /stats p. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11629 e03df62e-2008-0410-955e-edbf42e46eb7
2009-09-02Change OnHookUserIO to OnHookIO, making it usable for more than User* and ↵danieldg
less picky on string matching git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11628 e03df62e-2008-0410-955e-edbf42e46eb7
2009-09-01Remove unneeded paramaters from OnAcceptReadydanieldg
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11581 e03df62e-2008-0410-955e-edbf42e46eb7
2009-09-01Remove more text<->binary IP conversions, making code more IPv4/IPv6 independentdanieldg
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11578 e03df62e-2008-0410-955e-edbf42e46eb7
2009-09-01Change IP address storage in User to use more IPv4/IPv6 common codedanieldg
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11575 e03df62e-2008-0410-955e-edbf42e46eb7
2009-06-12This file *BROKEN AGAIN* in windows builds (VC9) - uint_16t and uint_32t do ↵brain
not exist in windows visual studio 2008! I will fix this at some later date unless someone beats me to it, as i still have no access to a reasonable PC. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11406 e03df62e-2008-0410-955e-edbf42e46eb7
2009-05-07Fix ListenSocketBase::GetPort() returning incorrect value on ports not bound ↵danieldg
to a specific address git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11367 e03df62e-2008-0410-955e-edbf42e46eb7
2009-05-04Canonicalize bind addresses when creating listen socketsdanieldg
This fixes /stats p output for SSL ports not working if a non-canonical address is used in the configuration (IPv6 with :: or mixed hexadecimal case). This also cleans up some now-useless sockaddr[2] allocations. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11361 e03df62e-2008-0410-955e-edbf42e46eb7
2009-03-15Update all wiki links to point to the new wiki. This was done automatically ↵psychon
with the following command, only .Makefile.inc got some indent fixups by hand. for file in $(find -type f -and -not -path '*/.svn/*' -and -not -name '*.so') ; do sed -e 's#http://www.inspircd.org/wiki#http://wiki.inspircd.org#' -e 's#http://wiki.inspircd.org/index.php/#http://wiki.inspircd.org/#' -i $file ; done git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11223 e03df62e-2008-0410-955e-edbf42e46eb7
2009-01-02Update copyrights for 2009.w00t
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10932 e03df62e-2008-0410-955e-edbf42e46eb7
2008-11-01Add comments on Daniel's workw00t
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10780 e03df62e-2008-0410-955e-edbf42e46eb7
2008-11-01Simulate AF_INET addresses for 4in6 connections [danieldg]w00t
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10779 e03df62e-2008-0410-955e-edbf42e46eb7
2008-11-01Merge commit 'ddg/out-12'w00t
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10778 e03df62e-2008-0410-955e-edbf42e46eb7
2008-10-27Merge commit 'danieldg/out-12'w00t
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10732 e03df62e-2008-0410-955e-edbf42e46eb7
2008-09-08Remove crappy, unsafe (and now unneeded!) casts.w00t
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10476 e03df62e-2008-0410-955e-edbf42e46eb7
2008-09-08Make OnAcceptReady pure virtual, rename ListenSocket to ListenSocketBase, ↵w00t
create ClientListenSocket and inherit from ListenSocketBase to create User objects. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10469 e03df62e-2008-0410-955e-edbf42e46eb7