Commit Graph

62 Commits (fb3b789dca8a2cf050dad7a7bd445d4789eaabea)

Author SHA1 Message Date
Matthew Wild be0728553e net.server_select: Don't close client connections when closing a server (it wasn't working anyway) 14 years ago
Matthew Wild 5d6f4c7124 net.server_select: Call ondisconnect handler, even if we closed the socket ourselves (fixes HTTP session hoarding, thanks Maranda) 14 years ago
Matthew Wild 007ebd8a18 net.server_select: Return error when SSL handshake fails immediately (thanks Zash) 14 years ago
Matthew Wild ffa939698b net.server, net.timer, net.server_select: Rearrange dependencies between these three modules. server.addtimer() is no longer a public function (renamed to _addtimer) and is not available at all from server_event (compat code removed to prevent traceback) (thanks Nulani) 14 years ago
Matthew Wild f56e371309 net.server_select: Remove server from _server table when closing 14 years ago
Matthew Wild 6975f1a07d net.server_select: Autostart SSL negotiation as the last part of socket setup to avoid a traceback (#262) (thanks Maranda) 14 years ago
Waqas Hussain a516177631 net.server_event, net.server_select: Fixed some global pollution. 14 years ago
Waqas Hussain 11c4ae1a2b net.server_select: Minor whitespace fix. 14 years ago
Matthew Wild b07e6ff42e net.server_select: Never call onincoming with nil data when a listener doesn't have an onconnect handler 14 years ago
Matthew Wild 868d6804c6 net.server_select: Remove socket from sendlist before calling listener callbacks (thanks darkrain) 15 years ago
Matthew Wild 80c0a2c470 net.server_select: Merge straight-SSL and starttls code paths, also fixes onconnect being called before handshake completion for straight-SSL 15 years ago
Matthew Wild b43b86615b net.server_select: Update error logging logic during SSL handshake (now shows correctly when a handshake exceeded max. allowed iterations) 15 years ago
Matthew Wild 7915c70e13 net.server_select: Small fix to SSL handshake logic, read/wrote were being checked despite it not being possible for them to be other than nil 15 years ago
Matthew Wild 2757058cd2 net.server_select: Do not set 'ssl' flag simply when assigning an sslctx to a handler, it doesn't mean anything 15 years ago
Florian Zeitz 6d5ef2f7f9 connlistener, server_select, prosody: Add support for binding to multiple addresses 15 years ago
Matthew Wild 231d285f0e net.server_select: Expose step() function (thanks Łukasz) 15 years ago
Matthew Wild 72dc9416ef net.server_select, net.server_event: Silence 'error during ssl handshake' for wantread and wantwrite 15 years ago
Matthew Wild acbe5b3dff net/server_select.lua: Reduce select() timeout back to 1s 15 years ago
Matthew Wild 22a83d733c net/server_select.lua: Reduce select() timeout back to 1s 15 years ago
Waqas Hussain a00d1e5354 net.server_select: Set select() timeout to 3600 by default. 15 years ago
Waqas Hussain 5400d9c376 net.server_select: Set select() timeout to 3600 by default. 15 years ago
Waqas Hussain 66b53a4192 net.server_select: Made another global local. 15 years ago
Waqas Hussain 8d6882c857 net.server_select: Made another global local. 15 years ago
Waqas Hussain 9fbc33dd68 net.server_select: Made some globals local. 15 years ago
Waqas Hussain 126964d60d net.server_select: Made some globals local. 15 years ago
Waqas Hussain 4495fa21cc net.server_select: Make changes required for sub-second timer precision. 15 years ago
Waqas Hussain 43c43237ae net.server_select: Make changes required for sub-second timer precision. 15 years ago
Matthew Wild 2d18b1e9a7 net.server_select: Restore real sendbuffer() before calling onconnect handler, in case onconnect sends data and the socket is still writeable (causing stack overflow into sendbuffer()/onconnect()) 15 years ago
Matthew Wild 40fa07ecfc net.server_select: Add server.step() to run through a single iteration of the event loop 16 years ago
Matthew Wild c3d3544fb0 net.server_select, net.server_event: Remove set_mode() call from server.link()... it can cause the last chunk of data to be discarded if shorter than buffersize (thanks to Zash for the debugging) 16 years ago
Matthew Wild 7ddf7d4745 net.server_select: Remove 'now' parameter from starttls(), and base it on whether the sendbuffer is empty instead 16 years ago
Matthew Wild b0c03f83ce net.server_select: Ensure that onconnect is called for server sockets as well as clients, rather than onincoming. Fixes mod_console traceback, issue #197 16 years ago
Matthew Wild e563e751d0 net.server_select: Clean up buffer and fire drained callback on successful write before we try and start TLS negotiation (if negotiation fails instantly then we can be left without a handler to use for cleanup) (thanks dersd) 16 years ago
Matthew Wild 10f55df529 net.server_select: Fix a snippet of code that was living at the wrong indentation level 16 years ago
Waqas Hussain 41fe87d3c5 net.server_select: Remove some debugging code. 16 years ago
Matthew Wild c900263556 net.server_select: Fix typo affecting connections with an onconnect listener that have data pending in the sendbuffer 16 years ago
Matthew Wild a22e222865 net.server_select, net.server_event: Add server.link() to link 2 connections with an intermediate buffer of the specified size 16 years ago
Matthew Wild 3c7eb58b08 net.server_select, net.server_event: Support for ondrain listener callback for when send buffer is empty 16 years ago
Matthew Wild 242d67b43e net.server_select, net.server_event: Rename :pattern() method to :set_mode() for select backend, and add :set_mode() to event backend 16 years ago
Matthew Wild c51d0beea7 net.server_select, net.server_event: Support for :pause() and :resume() on connections 16 years ago
Matthew Wild 6c9b44d630 net.server_select: Support for listener.onconnect 16 years ago
Tobias Markmann 3a972b1742 util.sasl: 2009 -> 2010 in copyright header. 16 years ago
Matthew Wild c071b4638d net.server_select: Fix for traceback when a read returns an error and no data (thanks dersd) 16 years ago
Matthew Wild 70e49af539 net.server_select: Fix typo 16 years ago
Matthew Wild 9d6219b596 net.server_select: Fix calling method of some handler.close()s 16 years ago
Matthew Wild 89d2043ed8 net.server_select: Small indentation fix 16 years ago
Matthew Wild 0a2515bd97 net.server_select: Fix traceback with no LuaSec available (thanks Nolan) 16 years ago
Matthew Wild 7f10afa423 net.server_select: Only allow starttls if luasec is available (thanks Nolan) 16 years ago
Matthew Wild 66e4eb082a net.server_select: *Major* whitespace refactoring to meet Prosody's coding style guidelines, we now have tabs 16 years ago
Matthew Wild 0e63f231e1 net.server_select: listener.status -> listener.onstatus for consistency 16 years ago