aboutsummaryrefslogtreecommitdiffstats
path: root/net/server_event.lua
Commit message (Collapse)AuthorAgeFilesLines
* server_event: Remove duplicated code (thanks waqas)Kim Alvefur2019-11-131-4/+0
| | | | | readcallback() calls onreadtimeout() and runs the exact same code if onreadtimeout() doesn't return true, which it doesn't do.
* net.server: Handle server name (SNI) as extra argumentKim Alvefur2019-09-011-0/+1
| | | | | | Code added in 75d2874502c3, 9a905888b96c and adc0672b700e uses this field. See #409 and #1408
* net.server: Accept and save an 'extra' field for client connectionsKim Alvefur2019-09-011-5/+6
| | | | | This lets code attach some extra data to be attached to client connections.
* net.server_event: Allow writing into buffer of write-locked connectionsKim Alvefur2019-03-241-2/+2
| | | | Check for 'nointerface' flag instead, whatever that means.
* net/server_event: fix typo in commentMaxime ?pep? Buquet2019-03-231-1/+1
|
* net.server: Only add alternate SNI contexts if at least one is providedKim Alvefur2019-03-111-1/+1
| | | | Fixes use of <starttls/> when a client sends SNI, which would send no certificate otherwise.
* net.server_event: Add SNI support (#409)Kim Alvefur2019-03-101-0/+10
| | | | Snippet adapted from server_epoll
* net.server: New API for creating server listenersKim Alvefur2018-09-131-6/+16
| | | | server.listen(interface, port, listeners, options);
* net.server: Add an API for holding writes of outgoing dataKim Alvefur2018-10-251-0/+13
|
* net.server_event: Deprecate :lock_read here tooKim Alvefur2018-10-281-0/+1
|
* net.server: Swich method for connecting sockets with remotesKim Alvefur2018-10-121-1/+1
| | | | | | | LuaSocket TCP sockets have have both :connect and :setpeername, which are the exact same function, however UDP sockets only have :setpeername. Switching to :setpeername allows most of this code to be generic wrt TCP/UDP.
* net.server: Remove socket constructor fallbackKim Alvefur2018-10-121-1/+1
| | | | Should no longer be needed
* net.server: Require IP address as argument to addclient (no DNS names)Kim Alvefur2018-10-111-8/+9
| | | | The net.connect API should be used to resolve DNS names first
* net.connect: Fix passing request table to new listenerKim Alvefur2018-09-261-2/+2
| | | | This could be a return value from ondetach
* net.server: Call a 'onattach' callback when replacing listenersKim Alvefur2018-09-261-0/+4
|
* net.server: Set default read timeout to 14 minutes (fixes #971)Kim Alvefur2018-07-061-1/+1
|
* net.server: Add watchfd, a simple API for watching file descriptorsKim Alvefur2018-05-091-0/+29
|
* net.server_event: Don't close servers if just quitting the loop onceMatthew Wild2018-04-101-1/+3
|
* Fix spelling throughout the codebase [codespell]Kim Alvefur2018-02-041-9/+9
|
* net.server_event: Not every instantly-readable connection is an error, ↵Matthew Wild2018-02-231-2/+6
| | | | continue if possible
* net.server_event: Better outgoing connection error handlingMatthew Wild2018-02-231-1/+3
| | | | | | Same as 67311cda0625. Check for readability. If a socket is readable after initial connection, it likely means an error, so we call the readcallback for that connection to handle it (and ultimately close).
* net.server_event: Split long line [luacheck]Kim Alvefur2017-11-101-1/+2
|
* net.server_event: Add "libevent" to backend descriptionKim Alvefur2017-10-091-1/+1
|
* Merge 0.10->trunkKim Alvefur2017-01-041-0/+1
|\
| * net.server_event: Also replace 'ondrain' when setting new listeners (thanks ↵Kim Alvefur2017-01-041-0/+1
| | | | | | | | Ge0rG)
* | Merge 0.10->trunkKim Alvefur2016-10-081-0/+4
|\|
| * net.server_event: Restore destruction of socket on read timeout (lost since ↵Kim Alvefur2016-10-081-0/+4
| | | | | | | | e67891ad18d6) (thanks Ge0rG)
* | Merge 0.10->trunkKim Alvefur2016-05-041-5/+6
|\|
| * net.server_event: Schedule another read callback if there is still data left ↵Kim Alvefur2016-05-041-1/+5
| | | | | | | | in buffer after reading (fixes #583 for real)
| * net.server_event: Collect entire one line function on one lineKim Alvefur2016-05-041-4/+1
| |
* | Merge 0.10->trunkKim Alvefur2016-04-191-1/+1
|\|
| * Merge 0.9->0.10Kim Alvefur2016-04-191-1/+1
| |\
| | * net.server_event: Check the buffer *length*, not the buffer itself (Fixes ↵Kim Alvefur2016-04-191-1/+1
| | | | | | | | | | | | 100% cpu usage introduced in 65abd9d7bf88)
* | | Merge 0.10->trunkKim Alvefur2016-04-191-4/+3
|\| |
| * | Merge 0.9->0.10Kim Alvefur2016-04-191-4/+3
| |\|
| | * net.server_event: Return the correct value as timeoutKim Alvefur2016-04-191-1/+1
| | |
| | * net.server_event: Fix traceback if event re-added during starttlsKim Alvefur2016-04-191-4/+3
| | |
* | | Merge 0.10->trunkKim Alvefur2016-04-191-0/+4
|\| |
| * | Merge 0.9->0.10Kim Alvefur2016-04-191-0/+4
| |\|
| | * net.server_event: Re-add write event if writebuffer is non-empty after write ↵Kim Alvefur2016-04-191-0/+4
| | | | | | | | | | | | (eg due to writes from ondrain callback) (fixes #661)
* | | Merge 0.10->trunkKim Alvefur2016-04-061-1/+0
|\| |
| * | server_event: addclient: wrapclient already calls startconnection for us ↵daurnimator2013-12-181-2/+1
| | | | | | | | | | | | [backported from trunk]
* | | Merge 0.10->trunkKim Alvefur2016-04-051-17/+22
|\| |
| * | server_event: Split long list of assignments into multiple lines for readabilityKim Alvefur2016-04-051-4/+7
| | |
| * | server_event: Fix indentation (again)Kim Alvefur2016-04-051-526/+527
| | |
* | | Merge 0.10->trunkKim Alvefur2016-03-021-7/+8
|\| |
| * | Merge 0.9->0.10Kim Alvefur2016-03-021-525/+526
| |\|
| | * net.server_event: Return true from conn:resume() to indicate successKim Alvefur2016-03-021-0/+1
| | |
| | * net.server_event: Prevent resuming connections without readcallback, eg ↵Kim Alvefur2016-03-021-1/+1
| | | | | | | | | | | | closed connections (fixes #590)
* | | Merge 0.10->trunkMatthew Wild2016-01-021-0/+1
|\| |