summaryrefslogtreecommitdiff
path: root/src/socketengines
AgeCommit message (Collapse)Author
2010-03-02DelFd should not fail, it will leave a bad dangling pointer in that casedanieldg
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12584 e03df62e-2008-0410-955e-edbf42e46eb7
2010-03-02Don't send events for removed FDs when both read and write are readydanieldg
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12582 e03df62e-2008-0410-955e-edbf42e46eb7
2010-03-02Log duplicate UUID events a bit betterdanieldg
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12580 e03df62e-2008-0410-955e-edbf42e46eb7
2010-02-13Fix kqueue to not report 0 maximum open socketsdanieldg
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12449 e03df62e-2008-0410-955e-edbf42e46eb7
2010-02-11When we get events on unknown file descriptors, unregister them rather than ↵danieldg
spinning at 100% CPU git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12436 e03df62e-2008-0410-955e-edbf42e46eb7
2010-01-18Remove excessive gettimeofday system callsdanieldg
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12293 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-10-24remove a hanging #endifpeavey
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11971 e03df62e-2008-0410-955e-edbf42e46eb7
2009-10-24Remove IOCP socket enginedanieldg
IOCP has been experimental since its introduction, and has not worked correctly for some time. Since we have no windows developer, remove the dead code. Most of the advantages of IOCP are not used by an ircd process regardless: we do not use threads for our client processing, and we add an extra copy operation that eliminates any gain from OS-level buffer reuse. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11970 e03df62e-2008-0410-955e-edbf42e46eb7
2009-10-14Fix noeol on socketengine_selectdanieldg
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11874 e03df62e-2008-0410-955e-edbf42e46eb7
2009-10-11Ugly-ish hack to select SocketEngine on windows until I or someone else ↵peavey
finds a better way. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11835 e03df62e-2008-0410-955e-edbf42e46eb7
2009-10-11Fix some signedness.peavey
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11830 e03df62e-2008-0410-955e-edbf42e46eb7
2009-10-11Fix Extend usage and a few other things for latest API. Compiles but not tested.peavey
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11828 e03df62e-2008-0410-955e-edbf42e46eb7
2009-09-30Remove include/inspircd_se_config.h and socketengine-specific headersdanieldg
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11784 e03df62e-2008-0410-955e-edbf42e46eb7
2009-09-28Fix linking errors on BSDdanieldg
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11774 e03df62e-2008-0410-955e-edbf42e46eb7
2009-09-26Compile fixes and message updatesdanieldg
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11767 e03df62e-2008-0410-955e-edbf42e46eb7
2009-09-26Add FD_WANT_SINGLE_WRITE to efficiently replace FD_WANT_POLL_WRITEdanieldg
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11762 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-21Create StreamSocket for IO hooking implementationdanieldg
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-09Fix invalid iterator in select socketengine, clean up its memory use a bit toodanieldg
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11687 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-02-14Nuke trailing spacespeavey
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11105 e03df62e-2008-0410-955e-edbf42e46eb7
2009-02-06Some fixes to the kqueue socket enginepsychon
The old code choked badly if a socket which was !eh->Readable() was added (it went into an endless loop where kqueue would keep reporting that socket for writeability). This also fixes a bug where DelFd() failed to clean up properly which caused the next AddFd() for an identical fd number to fail. Oh and this also adds some error messages and does some minor cleanup... git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11033 e03df62e-2008-0410-955e-edbf42e46eb7
2009-01-27Fix the poll socketengine to actually work.psychon
The old implementation tried to use holes for unused entries in the array for poll() and the OS replied with POLLNVAL to which we replied with 100% CPU. Improvements: - It does compile! - It works git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11008 e03df62e-2008-0410-955e-edbf42e46eb7
2009-01-22Fix for bug #686, include sysctl.h in a freebsd-specific ifdefbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10983 e03df62e-2008-0410-955e-edbf42e46eb7
2009-01-18Missed one, thx peavey!w00t
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10972 e03df62e-2008-0410-955e-edbf42e46eb7
2009-01-18Fix what should have been the (real) problems with kqueue, so far so good ↵w00t
for me.. this *does* need more testing though. Fix spotted by dz (check .filter, not .flags, and don't try to use it as a bitmask). TOR, ratbox, and similar projects use code like this, so I am fairly confident it is ok. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10971 e03df62e-2008-0410-955e-edbf42e46eb7
2009-01-18Revert "Revert some of w00ts kqueue massacre from september, for some reason ↵w00t
its not too stable, e.g. placing wantwrite sockets into oneshot wantread? :P" This reverts commit 11302829a008263dc306d08d675ad49d7d3f62ab. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10970 e03df62e-2008-0410-955e-edbf42e46eb7
2009-01-14This is more accurate. #ifndef __FreeBSD__, #else, #endifbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10962 e03df62e-2008-0410-955e-edbf42e46eb7
2009-01-14This should work, but not sure on these defines in poll socketenginebrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10961 e03df62e-2008-0410-955e-edbf42e46eb7
2009-01-14Revert some of w00ts kqueue massacre from september, for some reason its not ↵brain
too stable, e.g. placing wantwrite sockets into oneshot wantread? :P randomly uses 100% cpu with the newer code, seems kqueue doesnt quite like to work exactly the same as epoll and poll. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10960 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-12-23Backport from socket branch: allow read and write events to be triggered on ↵w00t
one kqueue iteration git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10906 e03df62e-2008-0410-955e-edbf42e46eb7
2008-09-19Fix my massacre of kqueue, filters may not be or'd.w00t
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10561 e03df62e-2008-0410-955e-edbf42e46eb7
2008-09-11Experimental WSAPoll (thanks for not just using poll(), guys) support for ↵w00t
Windows. Untested, uncompiled. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10516 e03df62e-2008-0410-955e-edbf42e46eb7
2008-09-11These socket engines may now recieve write and read events in the same ↵w00t
cycle, same as select and poll. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10514 e03df62e-2008-0410-955e-edbf42e46eb7
2008-09-04fix a warning. I am on a warning zapping crusade today.brain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10380 e03df62e-2008-0410-955e-edbf42e46eb7
2008-08-25Fixes to make poll(2) socket engine work properlyw00t
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10269 e03df62e-2008-0410-955e-edbf42e46eb7
2008-08-25Numerous changes to make this build..w00t
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10268 e03df62e-2008-0410-955e-edbf42e46eb7
2008-08-25Forward-port poll socket engine as it seems reasonably stable, and half-hack ↵w00t
it into configure. If someone could help me (easily) add it via our wonderful configure macros so it's built, that would be swell. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10264 e03df62e-2008-0410-955e-edbf42e46eb7
2008-08-23Forward port r10234, thanks psychonw00t
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10235 e03df62e-2008-0410-955e-edbf42e46eb7
2008-07-20Fixes to some stuff that writes on memory it shouldn't (thanks psychon).w00t
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10047 e03df62e-2008-0410-955e-edbf42e46eb7
2008-06-18Measure bandwidth statistics from the socket engine (kiloBITS per second in, ↵brain
out, total) and display them in /stats z plus send them via the named pipe to the windows gui git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9918 e03df62e-2008-0410-955e-edbf42e46eb7
2008-06-01Only prepare epoll for 25% of maxfds initially; it will grow beyond that as ↵special
necessary, but it's pretty unusual to be loading your server that much. Should save some kernel memory, too git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9832 e03df62e-2008-0410-955e-edbf42e46eb7
2008-06-01Improve debug output on a few key methods of epoll socketengine, a must when ↵peavey
coding for the socket engine. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9830 e03df62e-2008-0410-955e-edbf42e46eb7
2008-05-19Debug on out of range FD.w00t
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9776 e03df62e-2008-0410-955e-edbf42e46eb7
2008-05-11cleanup an old unused varpeavey
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9703 e03df62e-2008-0410-955e-edbf42e46eb7
2008-04-18Apply patches to remove 200-odd dll limit on windows, made by GreenReaper, ↵brain
lots of thanks! git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9533 e03df62e-2008-0410-955e-edbf42e46eb7
2008-04-15Fix obvious compile error (whoops)brain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9513 e03df62e-2008-0410-955e-edbf42e46eb7
2008-04-15the select socket engine went on the assumption that a socket may remove ↵brain
itself from the socket engine in the middle of the loop. Cull lists did away with this late 1.0, early 1.1, so there is now no need to keep this archaic system in here and we can halve the number of loops per cycle down to half what they used to be. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9512 e03df62e-2008-0410-955e-edbf42e46eb7