91 Commits

Author SHA1 Message Date
InspIRCd Robot
2f12f76ec9 Update copyright headers. 2020-07-30 14:31:12 +01:00
Matt Schatz
30648e84ce Fix secure websocket users not being seen as secure.
Since a TLS (SSL) module will always be the last IOHook attached
to a socket, IsSSL() needs to ignore any Middle IOHooks that may
also be attached.
2020-07-27 09:38:11 +01:00
InspIRCd Robot
aa692dc103 Update copyright headers. 2020-01-11 22:14:43 +00:00
Peter Powell
5f387071d3 Add a method for swapping user I/O handlers. 2019-07-21 16:57:19 +01:00
linuxdaemon
de7011e54a Add an overload of StreamSocket::Close which closes when all data has been written.
Fixes sending large pages in m_httpd (#1646).
2019-05-22 19:47:17 +01:00
Peter Powell
c2c4de7267 Fix linking servers with UNIX sockets.
- Remove the address/port overloads of BeginConnect.
- Change DoConnect to take a sockaddrs instead of an address/port.
2019-04-15 12:21:12 +01:00
linuxdaemon
f400d5f394 Redo OnSetEndPoint logic to fix duplicate clones (#1549). 2019-01-14 11:48:45 +00:00
Peter Powell
d62c870ffb Store the type of a StreamSocket within itself.
Similar to with IOHooks this allows you to convert StreamSocket to
a UserIOHandler quickly.
2018-10-25 13:50:43 +01:00
Peter Powell
0e6b18ff91 Fix warnings from Doxygen. 2018-10-21 19:18:08 +01:00
Peter Powell
09c5439c02 Add a module which implements the HAProxy PROXY v2 protocol. 2018-07-26 12:35:22 +01:00
Peter Powell
91e0af0fc4 Add the override keyword in places that it is missing.
GCCs warnings for this are much better than Clangs.
2017-11-21 15:51:45 +00:00
Peter Powell
36040be295 Fix a ton of -Wsign-conversion warnings. 2017-11-17 15:33:01 +00:00
Peter Powell
a62ae50007 Fix a bunch of Doxygen warnings. 2017-08-26 09:58:15 +01:00
Peter Powell
d1df2bce56 Add CXX11_OVERRIDE to overridden members that lack it.
This fixes a ton of warnings when building on compilers that
default to C++11 or newer.
2017-07-12 14:41:52 +01:00
Attila Molnar
a7a0f69c6b Add StreamSocket::SendQueue::moveall() for moving data between sendqs 2016-08-08 15:04:17 +02:00
Attila Molnar
87602cd040 Add support for multiple IOHooks per StreamSocket 2016-08-08 15:02:28 +02:00
Attila Molnar
6466e3093a Extract code that reads data into a recvq from StreamSocket::DoRead() into ReadToRecvQ() 2016-08-08 14:37:22 +02:00
Attila Molnar
d8ac63cd83 Extract code that flushes the sendq from StreamSocket::DoWrite() into FlushSendQ() 2016-08-08 14:35:00 +02:00
Attila Molnar
eef55acb1d Add StreamSocket::GetModHook() for obtaining the IOHook belonging to a given module
Use it to simplify logic in all modules using or providing IOHooks
2016-08-08 14:31:49 +02:00
Attila Molnar
1f0485039a Convert all code to use StreamSocket::SendQueue
Let OnStreamSocketWrite see the entire sendq instead of one element at a time
2015-06-06 14:31:05 +02:00
Attila Molnar
0858cdd53c Add class StreamSocket::SendQueue 2015-06-06 14:20:22 +02:00
Attila Molnar
a42246b2f1 Change StreamSocket::DoRead() and DoWrite() to be non-virtual, make DoRead() private 2015-04-12 16:22:09 +02:00
Attila Molnar
612384b3d4 Dispatch EventHandler events to dedicated virtual functions
Remove enum EventType
2015-04-12 16:20:13 +02:00
Attila Molnar
acccaa3964 Remove current time parameter of the Timer constructor 2014-07-10 12:17:55 +02:00
attilamolnar
79db1cf848 Create IOHook interface (extracted from Module) 2013-06-07 01:00:10 +02:00
attilamolnar
1638ee6193 Timer changes and TimerManager enhancements
Timer::Tick() now has a bool return value: if false is returned the timer is deleted using operator delete, otherwise, if it's a repeating timer then it's rescheduled (readded)
Timers are removed from the TimerManager automatically at destruction

Timers are now stored in a multimap instead of a sorted vector
2013-04-21 18:00:09 +02:00
Peter Powell
11cafc12d5 Tidy up source files:
- Use #pragma once instead of include guards.
- Move header files in src/modules to include/modules.
- Fixed various spacing issues.
2013-04-12 17:03:05 +01:00
Peter Powell
1883b0cebe Fix warning: "const type qualifier on return type has no effect". 2013-01-16 11:13:23 +00:00
Peter Powell
808a0a0957 Fix Doxygen syntax errors. 2012-07-05 21:00:35 +01:00
Robby-
46a3904619 Replace copyright headers with headers granting specific authors copyright 2012-04-19 20:58:29 +02:00
Justin Crawford
9ebd9cba72 Fix some of the include guard names (requested by SaberUK) 2012-04-14 23:33:20 -07:00
Justin Crawford
df5f76832e Fixes for bug #12 2012-04-14 18:03:25 -07:00
danieldg
343ab3f06d Fix for incorrect template application by GCC 3.4
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12285 e03df62e-2008-0410-955e-edbf42e46eb7
2010-01-17 19:51:12 +00:00
brain
cd712c40e1 ...because every now and again, i have to do a massive commit.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12248 e03df62e-2008-0410-955e-edbf42e46eb7
2010-01-11 03:07:32 +00:00
danieldg
fa2cdd0bb8 Force heap allocation of refcountbase, create usecountbase for non-allocation reference counting
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11978 e03df62e-2008-0410-955e-edbf42e46eb7
2009-10-25 20:03:55 +00:00
danieldg
9db7af579c Make classbase and refcountbase uncopyable; expand comments on their indended uses
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11888 e03df62e-2008-0410-955e-edbf42e46eb7
2009-10-17 18:52:39 +00:00
danieldg
3dc81ee133 Add explicit reference-counting base class
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11785 e03df62e-2008-0410-955e-edbf42e46eb7
2009-09-30 21:55:21 +00:00
danieldg
e2af2347fc Create StreamSocket for IO hooking implementation
Fixes the SSL SendQ bug
Removes duplicate code between User and BufferedSocket
Simplify SSL module API
Simplify EventHandler API (Readable/Writeable moved to SE)
Add hook for culled objects to invoke callbacks prior to destructor
 Replace SocketCull with GlobalCull now that sockets can close themselves
Shorten common case of user read/parse/write path:
 User::Write is now zero-copy up to syscall/SSL invocation
 User::Read has only two copy/scan passes from read() to ProcessCommand

git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11752 e03df62e-2008-0410-955e-edbf42e46eb7
2009-09-21 13:26:31 +00:00
danieldg
248a14477c Remove unneeded #ifdef IPV6 lines
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11582 e03df62e-2008-0410-955e-edbf42e46eb7
2009-09-01 15:08:09 +00:00
psychon
b6dbd6caab Update all wiki links to point to the new wiki. This was done automatically 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-03-15 12:42:35 +00:00
w00t
349b6b9193 Rewrite BufferedSocket::BindAddr to actually make sense, and not infinite loop under some conditions, etc. This also splits a lot of it into DoBindMagic(), for readability.
Seems to work okay on an invalid bind and nonexistant bind.. Fixes bug #754, reported by HiroP and Indoril.

Fix FD leak in some circumstances: if bind fails hard (requested address couldn't be bound), Close() the socket. Also fixes a deficiency of the previous commit in that if one address failed to bind, the FD would be invalidated.

git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11189 e03df62e-2008-0410-955e-edbf42e46eb7
2009-03-09 18:51:07 +00:00
peavey
f209cce90b Nuke trailing spaces
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11105 e03df62e-2008-0410-955e-edbf42e46eb7
2009-02-14 21:14:36 +00:00
w00t
43847ec9c7 Update copyrights for 2009.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10932 e03df62e-2008-0410-955e-edbf42e46eb7
2009-01-02 18:16:05 +00:00
w00t
ad35241743 Be consistent. Use ServerInstance in all places instead of 'Instance' in half. This has bugged me forever :p. I think I got all of extra/ too..
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10579 e03df62e-2008-0410-955e-edbf42e46eb7
2008-09-21 12:56:03 +00:00
w00t
89d956ff8b Remove unneeded namespace stuff.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10535 e03df62e-2008-0410-955e-edbf42e46eb7
2008-09-13 13:16:22 +00:00
w00t
798983e251 Minor style tidyup.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10533 e03df62e-2008-0410-955e-edbf42e46eb7
2008-09-12 20:56:49 +00:00
w00t
425fe205d0 Cleanup of some internals. Tested via m_httpd.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10527 e03df62e-2008-0410-955e-edbf42e46eb7
2008-09-12 12:08:25 +00:00
w00t
138f71ed13 Remove some duplication, everything calls the SE equivilant anyway.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10525 e03df62e-2008-0410-955e-edbf42e46eb7
2008-09-11 23:45:14 +00:00
w00t
b7b0f54047 Remove useless parameter.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10524 e03df62e-2008-0410-955e-edbf42e46eb7
2008-09-11 23:45:09 +00:00
w00t
6c9c925811 Fix a comment.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10523 e03df62e-2008-0410-955e-edbf42e46eb7
2008-09-11 23:45:06 +00:00