summaryrefslogtreecommitdiff
path: root/src/socketengines/socketengine_kqueue.cpp
AgeCommit message (Collapse)Author
2013-07-07Fix low risk crash when we can't determine maximum open socket count.Peter Powell
2012-12-25OpenBSD does not have KERN_MAXFILESPERPROC.Peter Powell
2012-10-14Replace printf(_c) with iostreamChrisTX
2012-04-19Replace copyright headers with headers granting specific authors copyrightRobby-
2011-03-03Fix excessive memory use in kqueueDaniel De Graaf
The maximum number of file descriptors was incorrectly using the OS maximum, not the process maximum. Thanks to Liath for finding & testing.
2010-03-16Fix mismatched return value in kqueue DelFddanieldg
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12639 e03df62e-2008-0410-955e-edbf42e46eb7
2010-03-16Fix typo in kqueuedanieldg
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12638 e03df62e-2008-0410-955e-edbf42e46eb7
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-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-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-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-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-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-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-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-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-04-07Patch from Brain: set MAX_DESCRIPTORS for all socket engines (I missed this)w00t
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9394 e03df62e-2008-0410-955e-edbf42e46eb7
2008-04-02Fix peavey and w00ts bug they found by removing the nonblocking part of the ↵brain
logger. This stuff was hackish and isnt required. If your hard disk locks up, then you have bigger worries. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9276 e03df62e-2008-0410-955e-edbf42e46eb7
2008-04-02DOH! Fix my muppetry of a segfault, and fix some warningsbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9273 e03df62e-2008-0410-955e-edbf42e46eb7
2008-04-02make sure we include the right headers and fix a warning in cmode_bbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9269 e03df62e-2008-0410-955e-edbf42e46eb7
2008-04-02Proper sysctl stuff to work with bsd. It seems that the uname value 4 is ↵brain
linux specific and they dont even have a const for it there! git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9268 e03df62e-2008-0410-955e-edbf42e46eb7
2008-04-02Automatic detection and allocation of max fds. No longer needs recompile to ↵brain
change, just adjust it in your kernel or whatever and restart insp. Please note that select and iocp socket engines do not support detection and are always set to FD_SETSIZE and 10240 descriptors respectively. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9263 e03df62e-2008-0410-955e-edbf42e46eb7
2008-02-22Convert remaining InspIRCd::Log() calls to new logging systemaquanight
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9001 e03df62e-2008-0410-955e-edbf42e46eb7
2008-02-14Keep count of the number of events in total, and seperate read, write and ↵brain
error event counters. We can use this for monitoring of heavy socket engine activity, e.g. a 'stuck' eventhandler git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8933 e03df62e-2008-0410-955e-edbf42e46eb7
2008-02-06Won't somebody please think of the children.. kqueue too ;(w00t
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8846 e03df62e-2008-0410-955e-edbf42e46eb7
2008-01-10Header update: 2007 -> 2008w00t
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8694 e03df62e-2008-0410-955e-edbf42e46eb7
2007-10-23Move socketengines into their own dir. This was all w00t's idea, but i told ↵brain
him no because i didnt think it would work. Now ive done it myself :P ner ner ne ner ner :) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8332 e03df62e-2008-0410-955e-edbf42e46eb7