aboutsummaryrefslogtreecommitdiffstats
path: root/src/inspsocket.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Fixed Windows build.Gravatar Adam2012-06-061-1/+2
| | | | | | | | | | | | Squash commit of the following from 2.0: commit cbd0b938d1e6a24c082fd510f3f6bb45a1ba3ce0 commit d392720f7fe4e3a85aec0f431b24d852d186d353 commit 30477f569bbd21590ad0687b5f09012deeb2b40e commit 4707f65e75867e443cbab8a5dcb0379341537263 commit e37621e04ea3b80c6f57c89873e530506f8d5587 commit 92cac06fc2e4207614efe0292d6cdf2954ff30a9 Plus many additional 2.1 specific fixes.
* Use socketengine functions for sending and receiving data instead of plain ↵Gravatar attilamolnar2012-05-281-1/+1
| | | | send() and recv() so /STATS z displays correct bandwidth usage
* Replace copyright headers with headers granting specific authors copyright.Gravatar Robin Burchell2012-04-191-8/+19
| | | | Fixes #61.
* Update copyright notices to 2011Gravatar Jackmcbarn2011-05-041-1/+1
|
* Remove inspsocket.h from inspircd.hGravatar Jackmcbarn2011-01-301-0/+1
|
* Remove timer.h from inspircd.hGravatar Jackmcbarn2011-01-301-0/+1
|
* Remove cull_list.h from inspircd.hGravatar Jackmcbarn2011-01-291-1/+2
|
* Remove errored FDs in the next HandleEvent if OnError neglects to do soGravatar Daniel De Graaf2010-10-021-0/+3
|
* Finish header file #include untangleGravatar Daniel De Graaf2010-08-081-3/+0
|
* Block writes to pending-connect socketGravatar Daniel De Graaf2010-08-031-1/+1
|
* Fix some more incorrect socket useGravatar danieldg2010-08-031-5/+0
|
* Don't try quite so hard to writev() the entire buffer in one goGravatar danieldg2010-08-031-4/+7
|
* New I/O hook APIGravatar Daniel De Graaf2010-08-031-12/+10
| | | | | | | | | This removes some pointless Module:: entries, uses the ServiceProvider lookup API for bind tags, and allows GnuTLS to use custom certificates per bind or link block using: <bind ssl="gnutls" ssl_cert="signed" ...> <ssl_cert name="signed" certfile="my.cert.pem" keyfile="my.key.pem">
* Dump sendq before closing socketGravatar danieldg2010-02-151-0/+2
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12469 e03df62e-2008-0410-955e-edbf42e46eb7
* Delink servers using an SSL module that is being reloadedGravatar danieldg2010-02-031-0/+1
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12367 e03df62e-2008-0410-955e-edbf42e46eb7
* Correctly abort attempted socket writes on errorGravatar danieldg2010-02-011-2/+2
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12340 e03df62e-2008-0410-955e-edbf42e46eb7
* Remove unneeded save of errnoGravatar danieldg2010-01-211-6/+0
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12309 e03df62e-2008-0410-955e-edbf42e46eb7
* ERROR is not a valid log level, so all these messages were getting droppedGravatar danieldg2010-01-191-1/+1
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12304 e03df62e-2008-0410-955e-edbf42e46eb7
* Fix stripping of character prior to delimiter in StreamSocket::GetNextLine ↵Gravatar danieldg2010-01-141-1/+1
| | | | | | (not noticed because it was usually \r) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12257 e03df62e-2008-0410-955e-edbf42e46eb7
* ...because every now and again, i have to do a massive commit.Gravatar brain2010-01-111-1/+1
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12248 e03df62e-2008-0410-955e-edbf42e46eb7
* Get rid of socklen_t parameter to Bind, we are using C++ here and can do it ↵Gravatar danieldg2009-11-131-1/+1
| | | | | | other ways git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12129 e03df62e-2008-0410-955e-edbf42e46eb7
* Fix double-cull of users quitting due to connection errorGravatar danieldg2009-11-121-1/+0
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12105 e03df62e-2008-0410-955e-edbf42e46eb7
* Catch exceptions in inspsocket callbacksGravatar danieldg2009-10-241-33/+41
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11966 e03df62e-2008-0410-955e-edbf42e46eb7
* Make irc::sockets::* parameters consistent, add irc::sockets::maskGravatar danieldg2009-10-221-2/+2
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11953 e03df62e-2008-0410-955e-edbf42e46eb7
* Kill ListenSocketBase, use OnAcceptConnection for all new connectionsGravatar danieldg2009-10-211-0/+1
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11950 e03df62e-2008-0410-955e-edbf42e46eb7
* Make classbase and refcountbase uncopyable; expand comments on their ↵Gravatar danieldg2009-10-171-2/+2
| | | | | | indended uses git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11888 e03df62e-2008-0410-955e-edbf42e46eb7
* Correct the will-block prediction on partial writev() returnGravatar danieldg2009-10-121-5/+5
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11849 e03df62e-2008-0410-955e-edbf42e46eb7
* Define DISABLE_WRITEV and use the IOHook single-copy method for Windows send()Gravatar danieldg2009-10-121-32/+76
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11848 e03df62e-2008-0410-955e-edbf42e46eb7
* * Fix inspsocket to not include uio.h on windows.Gravatar peavey2009-10-101-0/+2
| | | | | | | * Wrap writev and some structs to fix inspsocket compile on win. * Fix a few compile errors due to latest trunk changes in win32wrapper code. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11822 e03df62e-2008-0410-955e-edbf42e46eb7
* Move autoconnect next-server to TreeSocket::cull, and drop autoconnect ↵Gravatar danieldg2009-10-091-0/+2
| | | | | | reference once a connection is complete git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11811 e03df62e-2008-0410-955e-edbf42e46eb7
* Fix crash due to null address in DNSGravatar danieldg2009-10-031-2/+2
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11797 e03df62e-2008-0410-955e-edbf42e46eb7
* Add explicit reference-counting base classGravatar danieldg2009-09-301-1/+2
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11785 e03df62e-2008-0410-955e-edbf42e46eb7
* Fix compile errors on BSDGravatar danieldg2009-09-281-0/+1
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11773 e03df62e-2008-0410-955e-edbf42e46eb7
* SendQ bugfixesGravatar danieldg2009-09-271-15/+22
| | | | | | | | Fix DoWrite running on errored sockets Add testnet module for sendq and shutdown testing Prevent DoWrite from trying to write when writes are blocking git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11768 e03df62e-2008-0410-955e-edbf42e46eb7
* Compile fixes and message updatesGravatar danieldg2009-09-261-1/+4
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11767 e03df62e-2008-0410-955e-edbf42e46eb7
* Add FD_WANT_SINGLE_WRITE to efficiently replace FD_WANT_POLL_WRITEGravatar danieldg2009-09-261-1/+3
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11762 e03df62e-2008-0410-955e-edbf42e46eb7
* Clean up SocketEngine interface to allow edge-triggered I/O and sockets that ↵Gravatar danieldg2009-09-261-52/+95
| | | | | | do not force readability. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11760 e03df62e-2008-0410-955e-edbf42e46eb7
* Improve speed of SSL sendq processingGravatar danieldg2009-09-211-0/+16
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11756 e03df62e-2008-0410-955e-edbf42e46eb7
* Don't try to write to dead users, add debug to SquitServer, and remove a ↵Gravatar danieldg2009-09-211-0/+6
| | | | | | string copy in spanningtree write git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11753 e03df62e-2008-0410-955e-edbf42e46eb7
* Create StreamSocket for IO hooking implementationGravatar danieldg2009-09-211-353/+214
| | | | | | | | | | | | | | 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
* Change Extensible to use strongly typed entriesGravatar danieldg2009-09-131-3/+1
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11696 e03df62e-2008-0410-955e-edbf42e46eb7
* Use sa_size() rather than sizeof() when passing input parameters to a syscallGravatar danieldg2009-09-011-1/+1
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11583 e03df62e-2008-0410-955e-edbf42e46eb7
* Remove unneeded #ifdef IPV6 linesGravatar danieldg2009-09-011-17/+3
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11582 e03df62e-2008-0410-955e-edbf42e46eb7
* Move IP<->sockaddr conversions into irc::sockets:: namespaceGravatar danieldg2009-09-011-47/+6
| | | | git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11580 e03df62e-2008-0410-955e-edbf42e46eb7
* Remove needless sockaddr[2] allocations, replace with ↵Gravatar danieldg2009-09-011-17/+8
| | | | | | irc::sockets::sockaddrs union git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11574 e03df62e-2008-0410-955e-edbf42e46eb7
* Fix sockaddr length argument, BSD will complain if it doesn't exactly match ↵Gravatar danieldg2009-06-161-1/+1
| | | | | | the expected size git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11414 e03df62e-2008-0410-955e-edbf42e46eb7
* Backport BufferedSocket::DoConnect rewrite to fix valgrind warningGravatar danieldg2009-06-141-61/+8
| | | | | | Syscall param socketcall.connect(serv_addr..sin6_flowinfo) points to uninitialised byte(s) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11411 e03df62e-2008-0410-955e-edbf42e46eb7
* Fix bug found by Jeremy from Teranova, thanks: if an explicit bind to an IP ↵Gravatar w00t2009-04-301-5/+13
| | | | | | is not made, don't assume all <bind> tags are for ipv6 IPs on an IPv6 compile (WTF). git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11342 e03df62e-2008-0410-955e-edbf42e46eb7
* Update all wiki links to point to the new wiki. This was done automatically ↵Gravatar psychon2009-03-151-1/+1
| | | | | | | | | 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
* Rewrite BufferedSocket::BindAddr to actually make sense, and not infinite ↵Gravatar w00t2009-03-091-61/+86
| | | | | | | | | | 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