summaryrefslogtreecommitdiff
path: root/src/inspsocket.cpp
AgeCommit message (Collapse)Author
2008-07-12Remove individual read buffers inside of BufferedSocket, use the shared ↵w00t
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-02Fix an off-by-one which could possibly perhaps cause djGrrr/satmd's bug by ↵w00t
dropping a read buffer into the bit bucket if it was of an exact enough size to cause problems. No guarentees. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9944 e03df62e-2008-0410-955e-edbf42e46eb7
2008-05-19Listening bufferedsockets dont have an OnRawSocketClose event as theyre ↵brain
never 'opened' git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9773 e03df62e-2008-0410-955e-edbf42e46eb7
2008-04-01Remove call to FlushWriteBuffer from BufferedSocket::Write(), this means we ↵w00t
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-01Remove deprecated BufferedSocket::MarkAsClosed()w00t
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9246 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-13Commit patch from danieldg that makes a ton of stuff const-safe for latest ↵brain
warn-happy trigger-happy gcc4 (thanks) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8922 e03df62e-2008-0410-955e-edbf42e46eb7
2008-02-11Add -Wshadow to cflags, and fix a bunch of warnings that come with it. Add a ↵w00t
note to webirc that needs looking at. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8892 e03df62e-2008-0410-955e-edbf42e46eb7
2008-01-14IPv6 fix, thanks to danieldg. Doesn't affect 1.1.w00t
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8709 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-11-12Argh, i give upbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8594 e03df62e-2008-0410-955e-edbf42e46eb7
2007-11-12NOTE: our stuff for parsing multiple dns replies for dnsbl with an 'A record ↵brain
reply' is broken. We will fix this at some later date. It was breaking other stuff git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8591 e03df62e-2008-0410-955e-edbf42e46eb7
2007-11-11This works with multiple remote includes now except it hangs when an include ↵brain
is within an include git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8590 e03df62e-2008-0410-955e-edbf42e46eb7
2007-11-01Comment a message out that people regularly attempt to interpretw00t
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8453 e03df62e-2008-0410-955e-edbf42e46eb7
2007-10-23Pedantic safebrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8317 e03df62e-2008-0410-955e-edbf42e46eb7
2007-10-22Remove the need for a bunch of the hard coded arrays/hashes by scanning the ↵brain
src/ dir for tag comments, like in modules git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8307 e03df62e-2008-0410-955e-edbf42e46eb7
2007-10-15InspSocket -> BufferedSocket. Paves the way for a SimpleSocket class which ↵w00t
ident etc will use. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8206 e03df62e-2008-0410-955e-edbf42e46eb7
2007-10-13Fix potential for ssl to block, based on patch submitted by djGrrr, adjusted ↵brain
for trunk new socket engine, thanks git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8154 e03df62e-2008-0410-955e-edbf42e46eb7
2007-09-13Fixed a rare infinite loop in InspSocket::FlushWriteBuffer() - this could ↵special
only affect a few rarely used modules, and is difficult to trigger. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8031 e03df62e-2008-0410-955e-edbf42e46eb7
2007-08-27Remove more unnecessary header trafficw00t
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7887 e03df62e-2008-0410-955e-edbf42e46eb7
2007-08-23Someone really should fix the blocking connects on windows craq...brain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7813 e03df62e-2008-0410-955e-edbf42e46eb7
2007-08-23Craquity craq De-craq!brain
This is probably broken on windows, do not attempt to use there yet unless you like broken stuff. Cant say for sure as i havent even tried to build yet and most likely wont tonight. --- Abstract most of the berkely socket API out into SocketEngine derived classes. SocketEngine base class implements standard berkely sockets that 'real mens systems' like linux and freebsd have. For socketengine_iocp we implement the windows specific nonesense like the special things needed for udp and accept (ick). All this to eliminate a bunch of ifdefs. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7810 e03df62e-2008-0410-955e-edbf42e46eb7
2007-08-20Add comments explaining why we have sockaddr[2] so that nobody goes ↵brain
'w...t..f...' git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7779 e03df62e-2008-0410-955e-edbf42e46eb7
2007-08-20Fix a bug i just introduced while playing with the codebrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7777 e03df62e-2008-0410-955e-edbf42e46eb7
2007-08-20The only possibility for the issue sts found is that a socket is deleted but ↵brain
also ends up in the socket cull list somehow. To ensure that the socket does not get deleted, remove the delete and replace with an explicit call to insert into the socket cull list. We were grappling with these issues in early 1.1 with the userrec cull list, too. NOTE for later 1.2's consider making CullList a base class which we can derive from to delete lists of other items than userrecs. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7775 e03df62e-2008-0410-955e-edbf42e46eb7
2007-07-27Windows specific data types in EventHandler are now Extensible itemsbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7599 e03df62e-2008-0410-955e-edbf42e46eb7
2007-07-27Tidyups, remove of ifdefsbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7597 e03df62e-2008-0410-955e-edbf42e46eb7
2007-07-27Found the bug, turns out i just introduced it with the last commit :pbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7591 e03df62e-2008-0410-955e-edbf42e46eb7
2007-07-27Some smart tricks to eliminate win32 ifdefs that are creeping into portable ↵brain
files git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7589 e03df62e-2008-0410-955e-edbf42e46eb7
2007-07-23* Sockets will now always be nonblocking on win32 version of InspIRCd. There ↵burlex
were some cases (mainly in TreeSockets) where a socket would not get restored to nonblocking mode after a connect() call, resulting in the server getting stuck on a blocking send() call causing freezeups. * configure will now compile under VC7 again. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7500 e03df62e-2008-0410-955e-edbf42e46eb7
2007-07-18Ive tidied up the mode count stuff, but i still cant duplicate negative ↵brain
invisible counts. :( git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7474 e03df62e-2008-0410-955e-edbf42e46eb7
2007-07-16OOPS! We try again, since I'm smoking craq. LF is 0x0a NOT CR.peavey
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7456 e03df62e-2008-0410-955e-edbf42e46eb7
2007-07-16'svn propset -R svn:eol-style CR *' Set to UNIX-style always. Binaries are ↵peavey
auto skipped by svn. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7454 e03df62e-2008-0410-955e-edbf42e46eb7
2007-07-11Fix for bug #347.brain
WARNING: QA PEOPLE, THIS NEEDS TESTING!!!! Test this with lots of squits and connects, and i mean lots and lots in all different ways you can think of, /squit, pingout, closing the connection with a firewall etc. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7434 e03df62e-2008-0410-955e-edbf42e46eb7
2007-07-06Warning: Loads of craq logging in here atm. /connect with openssl is broken, ↵brain
gnutls seems fine git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7428 e03df62e-2008-0410-955e-edbf42e46eb7
2007-07-06SSL buffering tweaks. NOTE this is not a complete fix till i say so, don't ↵brain
use this in production yet unless youre a masochist. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7427 e03df62e-2008-0410-955e-edbf42e46eb7
2007-06-09Change some = "" to clear() and some == "" to .empty()brain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7263 e03df62e-2008-0410-955e-edbf42e46eb7
2007-05-30Apply ipv6 #ifdef tidyup patch from djGrrr, thanks :)brain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7190 e03df62e-2008-0410-955e-edbf42e46eb7
2007-05-28- Add fix for /stats p support (this->port was not being set for listening ↵w00t
inspsockets, thanks peavey). git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7171 e03df62e-2008-0410-955e-edbf42e46eb7
2007-05-19Visual studio's ability to translate tabs to four spaces as default ↵brain
frustrates and peplexes tabnazi cat. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7047 e03df62e-2008-0410-955e-edbf42e46eb7
2007-05-19Windows support. Tested and working to compile on freebsd and linux. Next ↵w00t
step is to make sure it actually works in windows too. ;p. Add Burlex to contributors. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7043 e03df62e-2008-0410-955e-edbf42e46eb7
2007-05-01Much more detailed logging of lowlevel socket errors to the +l snomaskbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6856 e03df62e-2008-0410-955e-edbf42e46eb7
2007-05-01Fix crashbug in latest svn introduced by inspsocket cull list, which can ↵brain
cause a crash if the connection times out and an error occurs on the socket before its deleted git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6855 e03df62e-2008-0410-955e-edbf42e46eb7
2007-04-26Make error reporting work properly, it seemed to loose errors.brain
First change: Add a culling list of inspsockets waiting to be closed, so the close() is less likely to be called before the buffer is entirely empty. This seems to work well on my LAN. Second change: Add a SendError() method, rather than WriteLine("ERROR : ..."). This can be used to effect by also echoing out "Sent ERROR to %s: ..." onto the +l snomask meaning at least one end will always see the error even if the ERROR command is lost due to latency or design of the transport (e.g. ssl which may be writing during a read event etc) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6844 e03df62e-2008-0410-955e-edbf42e46eb7
2007-04-19Fix for bug #261 - Needs QA'ing.brain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6813 e03df62e-2008-0410-955e-edbf42e46eb7
2007-03-24Remove unused variablebrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6704 e03df62e-2008-0410-955e-edbf42e46eb7
2007-03-23ident over ipv6 fixes, and fixes to inspsocket BindAddr which wasnt doing ↵brain
ipv6 outbound connects properly. You'll need to restart to apply this one, dmb git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6702 e03df62e-2008-0410-955e-edbf42e46eb7
2007-03-22Fix high-bandwidth stuff with inspsocket+ssl, and eagainbrain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6699 e03df62e-2008-0410-955e-edbf42e46eb7
2007-02-12Fixed <link:bind> which was only working on an ipv6 connection. Fixes bug ↵brain
#213 reported by owine git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6581 e03df62e-2008-0410-955e-edbf42e46eb7
2007-02-07Ident fixes,brain
removal of some old craq we dont use. cgiirc optimizations and tidyups git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6541 e03df62e-2008-0410-955e-edbf42e46eb7