Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Merge 0.12->trunk | Kim Alvefur | 2024-07-07 | 1 | -1/+16 |
|\ | |||||
| * | net.server_event: Add 'wrapserver' API | Kim Alvefur | 2024-07-07 | 1 | -1/+16 |
| | | | | | | | | | | | | | | | | | | This enables accepting admin stream socket (UNIX) connections trough the same procedures as any other (TCP) socket, which avoids problems caused by using the wrapclient API, which ends up discarding early data due to only expecting early connection failure. Fixes #1867 | ||||
* | | net: Prefix module imports with prosody namespace | Kim Alvefur | 2023-03-17 | 1 | -4/+4 |
| | | |||||
* | | net.server: Fix multiple return values | Kim Alvefur | 2022-06-03 | 1 | -4/+12 |
| | | | | | | | | | | | | | | return foo and foo() crops multiple return values to a single one, so any second return values etc were last, mostly error details. Introduced in 7e9ebdc75ce4 | ||||
* | | net: refactor sslconfig to not depend on LuaSec | Jonas Schäfer | 2022-04-02 | 1 | -0/+6 |
| | | | | | | | | | | | | | | | | | | | | | | This now requires that the network backend exposes a tls_builder function, which essentially wraps the former util.sslconfig.new() function, passing a factory to create the eventual SSL context. That allows a net.server backend to pick whatever it likes as SSL context factory, as long as it understands the config table passed by the SSL config builder. Heck, a backend could even mock and replace the entire SSL config builder API. | ||||
* | | net: isolate LuaSec-specifics | Jonas Schäfer | 2022-04-27 | 1 | -4/+24 |
|/ | | | | | | | | | | | | | | For this, various accessor functions are now provided directly on the sockets, which reach down into the LuaSec implementation to obtain the information. While this may seem of little gain at first, it hides the implementation detail of the LuaSec+LuaSocket combination that the actual socket and the TLS layer are separate objects. The net gain here is that an alternative implementation does not have to emulate that specific implementation detail and "only" has to expose LuaSec-compatible data structures on the new functions. | ||||
* | Spelling: Fix various spelling mistakes (thanks timeless) | Kim Alvefur | 2022-03-07 | 1 | -3/+3 |
| | | | | | | Words, sometimes I wonder how they even work Maybe I missed something. | ||||
* | net.server: Add a predrain callaback just before writes | Kim Alvefur | 2021-08-16 | 1 | -0/+5 |
| | | | | | | | | | | Allows sneaking in things in the write buffer just before it's sent to the network stack. For example ack requests, compression flushes or other things that make sense to send after stanzas or other things. This ensures any additional trailing data sent is included in the same write, and possibly the same TCP packet. Other methods used such as timers or nextTick might not have the same effect as it depends on scheduling. | ||||
* | net.server_event: Silence luacheck warnings | Kim Alvefur | 2019-12-23 | 1 | -0/+2 |
| | |||||
* | server_event: Remove duplicated code (thanks waqas) | Kim Alvefur | 2019-11-13 | 1 | -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 argument | Kim Alvefur | 2019-09-01 | 1 | -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 connections | Kim Alvefur | 2019-09-01 | 1 | -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 connections | Kim Alvefur | 2019-03-24 | 1 | -2/+2 |
| | | | | Check for 'nointerface' flag instead, whatever that means. | ||||
* | net/server_event: fix typo in comment | Maxime “pep” Buquet | 2019-03-23 | 1 | -1/+1 |
| | |||||
* | net.server: Only add alternate SNI contexts if at least one is provided | Kim Alvefur | 2019-03-11 | 1 | -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 Alvefur | 2019-03-10 | 1 | -0/+10 |
| | | | | Snippet adapted from server_epoll | ||||
* | net.server: New API for creating server listeners | Kim Alvefur | 2018-09-13 | 1 | -6/+16 |
| | | | | server.listen(interface, port, listeners, options); | ||||
* | net.server: Add an API for holding writes of outgoing data | Kim Alvefur | 2018-10-25 | 1 | -0/+13 |
| | |||||
* | net.server_event: Deprecate :lock_read here too | Kim Alvefur | 2018-10-28 | 1 | -0/+1 |
| | |||||
* | net.server: Swich method for connecting sockets with remotes | Kim Alvefur | 2018-10-12 | 1 | -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 fallback | Kim Alvefur | 2018-10-12 | 1 | -1/+1 |
| | | | | Should no longer be needed | ||||
* | net.server: Require IP address as argument to addclient (no DNS names) | Kim Alvefur | 2018-10-11 | 1 | -8/+9 |
| | | | | The net.connect API should be used to resolve DNS names first | ||||
* | net.connect: Fix passing request table to new listener | Kim Alvefur | 2018-09-26 | 1 | -2/+2 |
| | | | | This could be a return value from ondetach | ||||
* | net.server: Call a 'onattach' callback when replacing listeners | Kim Alvefur | 2018-09-26 | 1 | -0/+4 |
| | |||||
* | net.server: Set default read timeout to 14 minutes (fixes #971) | Kim Alvefur | 2018-07-06 | 1 | -1/+1 |
| | |||||
* | net.server: Add watchfd, a simple API for watching file descriptors | Kim Alvefur | 2018-05-09 | 1 | -0/+29 |
| | |||||
* | net.server_event: Don't close servers if just quitting the loop once | Matthew Wild | 2018-04-10 | 1 | -1/+3 |
| | |||||
* | Fix spelling throughout the codebase [codespell] | Kim Alvefur | 2018-02-04 | 1 | -9/+9 |
| | |||||
* | net.server_event: Not every instantly-readable connection is an error, ↵ | Matthew Wild | 2018-02-23 | 1 | -2/+6 |
| | | | | continue if possible | ||||
* | net.server_event: Better outgoing connection error handling | Matthew Wild | 2018-02-23 | 1 | -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 Alvefur | 2017-11-10 | 1 | -1/+2 |
| | |||||
* | net.server_event: Add "libevent" to backend description | Kim Alvefur | 2017-10-09 | 1 | -1/+1 |
| | |||||
* | Merge 0.10->trunk | Kim Alvefur | 2017-01-04 | 1 | -0/+1 |
|\ | |||||
| * | net.server_event: Also replace 'ondrain' when setting new listeners (thanks ↵ | Kim Alvefur | 2017-01-04 | 1 | -0/+1 |
| | | | | | | | | Ge0rG) | ||||
* | | Merge 0.10->trunk | Kim Alvefur | 2016-10-08 | 1 | -0/+4 |
|\| | |||||
| * | net.server_event: Restore destruction of socket on read timeout (lost since ↵ | Kim Alvefur | 2016-10-08 | 1 | -0/+4 |
| | | | | | | | | e67891ad18d6) (thanks Ge0rG) | ||||
* | | Merge 0.10->trunk | Kim Alvefur | 2016-05-04 | 1 | -5/+6 |
|\| | |||||
| * | net.server_event: Schedule another read callback if there is still data left ↵ | Kim Alvefur | 2016-05-04 | 1 | -1/+5 |
| | | | | | | | | in buffer after reading (fixes #583 for real) | ||||
| * | net.server_event: Collect entire one line function on one line | Kim Alvefur | 2016-05-04 | 1 | -4/+1 |
| | | |||||
* | | Merge 0.10->trunk | Kim Alvefur | 2016-04-19 | 1 | -1/+1 |
|\| | |||||
| * | Merge 0.9->0.10 | Kim Alvefur | 2016-04-19 | 1 | -1/+1 |
| |\ | |||||
| | * | net.server_event: Check the buffer *length*, not the buffer itself (Fixes ↵ | Kim Alvefur | 2016-04-19 | 1 | -1/+1 |
| | | | | | | | | | | | | 100% cpu usage introduced in 65abd9d7bf88) | ||||
* | | | Merge 0.10->trunk | Kim Alvefur | 2016-04-19 | 1 | -4/+3 |
|\| | | |||||
| * | | Merge 0.9->0.10 | Kim Alvefur | 2016-04-19 | 1 | -4/+3 |
| |\| | |||||
| | * | net.server_event: Return the correct value as timeout | Kim Alvefur | 2016-04-19 | 1 | -1/+1 |
| | | | |||||
| | * | net.server_event: Fix traceback if event re-added during starttls | Kim Alvefur | 2016-04-19 | 1 | -4/+3 |
| | | | |||||
* | | | Merge 0.10->trunk | Kim Alvefur | 2016-04-19 | 1 | -0/+4 |
|\| | | |||||
| * | | Merge 0.9->0.10 | Kim Alvefur | 2016-04-19 | 1 | -0/+4 |
| |\| | |||||
| | * | net.server_event: Re-add write event if writebuffer is non-empty after write ↵ | Kim Alvefur | 2016-04-19 | 1 | -0/+4 |
| | | | | | | | | | | | | (eg due to writes from ondrain callback) (fixes #661) | ||||
* | | | Merge 0.10->trunk | Kim Alvefur | 2016-04-06 | 1 | -1/+0 |
|\| | |