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
w00t
9183ebd28c
There is absolutely no need to cache connect timeout.
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10512 e03df62e-2008-0410-955e-edbf42e46eb7
2008-09-11 00:15:42 +00:00
w00t
7a7fb7167c
Remove an unused member.
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10511 e03df62e-2008-0410-955e-edbf42e46eb7
2008-09-11 00:15:39 +00:00
w00t
bd6158e7b0
Remove WaitingForWriteEvent, it seems to do *nothing* except confuse things. Also, don't close socket on http if FlushWriteBuf doesn't write it all in one go, in fact, don't try FlushWriteBuf at all - use the sockets default of waiting to be told it's safe to write data.
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10509 e03df62e-2008-0410-955e-edbf42e46eb7
2008-09-11 00:15:28 +00:00
w00t
531fb6fed2
Remove a totally redundant method (this is already available via inheritance from EventHandler)
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10490 e03df62e-2008-0410-955e-edbf42e46eb7
2008-09-09 14:27:04 +00:00
w00t
d48f72b989
Remove listening from BufferedSocket, it's bloaty and horrid. We have a ListenSocketBase class to handle this instead now. :)
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10470 e03df62e-2008-0410-955e-edbf42e46eb7
2008-09-08 19:23:17 +00:00
w00t
0a45c56f10
Remove individual read buffers inside of BufferedSocket, use the shared netbuffer instead, like users. This means a 65kb saving per BufferedSocket.
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9960 e03df62e-2008-0410-955e-edbf42e46eb7
2008-07-12 09:13:06 +00:00
w00t
86c2b7abf7
Remove call to FlushWriteBuffer from BufferedSocket::Write(), this means we don't try write() pointlessly when we may very well not (chewing CPU), and instead waits for the socketengine to tell us we can write. Tested, works fine. (nothing used this return value anyway)
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9247 e03df62e-2008-0410-955e-edbf42e46eb7
2008-04-01 18:56:31 +00:00
w00t
6953371f71
Remove deprecated BufferedSocket::MarkAsClosed()
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9246 e03df62e-2008-0410-955e-edbf42e46eb7
2008-04-01 18:34:34 +00:00
brain
bfaf7e3b27
Commit patch from danieldg that makes a ton of stuff const-safe for latest warn-happy trigger-happy gcc4 (thanks)
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8922 e03df62e-2008-0410-955e-edbf42e46eb7
2008-02-13 18:22:19 +00:00
w00t
f127161467
Clear up header insanity
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8808 e03df62e-2008-0410-955e-edbf42e46eb7
2008-02-03 23:20:20 +00:00
w00t
e4acbc95b8
Header update: 2007 -> 2008
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8694 e03df62e-2008-0410-955e-edbf42e46eb7
2008-01-10 13:27:07 +00:00
w00t
2b68243097
InspSocket -> BufferedSocket. Paves the way for a SimpleSocket class which ident etc will use.
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8206 e03df62e-2008-0410-955e-edbf42e46eb7
2007-10-15 21:04:32 +00:00
w00t
03e0fb206d
InspTimer -> Timer
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8205 e03df62e-2008-0410-955e-edbf42e46eb7
2007-10-15 21:03:30 +00:00
peavey
f2acdbc382
OOPS! We try again, since I'm smoking craq. LF is 0x0a NOT CR.
...
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7456 e03df62e-2008-0410-955e-edbf42e46eb7
2007-07-16 17:30:04 +00:00