Commit graph

277 commits

Author SHA1 Message Date
Kim Alvefur
b093d6f947 server_epoll: Add closeall() method for closing all clients and servers 2017-01-01 19:30:38 +01:00
Kim Alvefur
5c48dbda51 server_epoll: Add native support for per socket bandwith limits 2016-12-18 17:39:16 +00:00
Kim Alvefur
ad9b431b8c net.server_epoll: Remove unused local [luacheck] 2019-07-26 21:23:53 +02:00
Kim Alvefur
0cd5fc425d net.server_epoll: Overhaul logging with one log sink per connection 2019-07-26 21:21:48 +02:00
Kim Alvefur
e6a6668fb5 net.server_epoll: Deprecate libevent emulation layer 2019-07-24 16:50:06 +02:00
Kim Alvefur
d9649edc2c net.server_epoll: Return errors from creating sockets
Prevents error from attempting to index nil conn on such failure.

Silences luacheck warning about the 'err' variable being unused
2019-07-23 18:06:34 +02:00
Kim Alvefur
2b596d7bd6 net.server_epoll: Add experimental option to close connections in case of listener error
Sometimes such errors leave sessions in an inconsistent state, so it
might be better to close them early.
2019-05-25 16:14:31 +02:00
Kim Alvefur
d06300c456 net.server_epoll: Return listener error message 2019-05-25 16:09:26 +02:00
Kim Alvefur
4460256832 Merge 0.11->trunk 2019-05-04 04:33:41 +02:00
Kim Alvefur
c8bbcabaf7 net.server_epoll: Use _SOCKETINVALID from LuaSocket 2016-11-23 17:27:44 +01:00
Kim Alvefur
78fdfac11b net.server_epoll: Make sure socket exists before checking if there is buffered data in it 2016-10-27 23:19:30 +02:00
Kim Alvefur
8b4bf07cf1 net.server_epoll: Check that connection still exists after callback, fixes traceback when closed 2016-10-09 21:48:53 +02:00
Kim Alvefur
15c519eb2f net.server_epoll: Separate ok from err branch more 2016-10-07 17:18:29 +02:00
Kim Alvefur
aaefe2e6ed net.server_epoll: Make minimum poll wait time configurable 2016-09-04 17:17:22 +02:00
Kim Alvefur
54332813ba net.server_epoll: Support for setting configuration parameters 2016-09-04 17:16:46 +02:00
Kim Alvefur
82a62b94c7 net.server_epoll: More comments 2016-08-27 18:39:23 +02:00
Kim Alvefur
feef5c41f1 net.server_epoll: Remove commented out code 2016-08-23 20:31:14 +02:00
Kim Alvefur
1fdfd19e4f net.server_epoll: Return early in the event of zero timers 2016-08-23 20:01:02 +02:00
Kim Alvefur
25d455bd21 net.server_epoll: Fix timer returning boolean 2016-08-23 19:23:26 +02:00
Kim Alvefur
9e5719aa47 net.server_epoll: Let :init handle setup for onconnect handling 2016-08-22 17:22:34 +02:00
Kim Alvefur
6d88b49540 net.server_epoll: Tailcalls 2016-08-22 17:20:54 +02:00
Kim Alvefur
e98fe5eb04 net.server_epoll: Move management of fd registry to :setflags 2016-08-22 17:19:49 +02:00
Kim Alvefur
e0bc7dd70f net.server_epoll: Comments 2016-08-22 17:13:39 +02:00
Kim Alvefur
65802705d2 net.server_epoll: Make maximum wait time configurable 2016-08-22 17:12:58 +02:00
Kim Alvefur
286527bbc9 net.server_epoll: Set timers before calling onincoming, fixes traceback if connection is closed before onincoming returns 2016-08-18 17:41:00 +02:00
Kim Alvefur
5e5b45be6e net.server_epoll: Call ondetach when listeners are replaced 2016-08-18 17:23:06 +02:00
Kim Alvefur
81dcc80c9b net.server_epoll: Make sure wantwrite is set when starting TLS 2016-08-18 17:17:16 +02:00
Kim Alvefur
7b734a63a0 net.server_epoll: Prevent invalid FDs from being added to epoll 2016-08-18 17:16:21 +02:00
Kim Alvefur
85891f3160 net.server_epoll: Make sure a recent LuaSocket is avaliable 2016-08-18 17:15:52 +02:00
Kim Alvefur
f91a22024b net.server_epoll: Trigger onconnect for TLS connections when writable after handshake 2016-08-18 17:15:32 +02:00
Kim Alvefur
1a8fd7920f net.server_epoll: Add separate timout for initial connection 2016-08-18 17:13:22 +02:00
Kim Alvefur
e72b357bd7 net.server_epoll: TLS handshake timeout 2016-08-18 17:07:14 +02:00
Kim Alvefur
9f8d0b3e95 net.server_epoll: Refactor to use common initialization 2016-08-18 16:59:31 +02:00
Kim Alvefur
86989d47bc net.server_epoll: Connect async in addclient 2016-08-18 17:04:57 +02:00
Kim Alvefur
a0d0705978 net.server_epoll: Return status from starttls method 2016-08-18 16:48:16 +02:00
Kim Alvefur
e7e49c4d02 net.server_epoll: Prevent anything from happening to destroyed sockets 2016-08-18 16:46:20 +02:00
Kim Alvefur
f8cf3d1254 net.server_epoll: Prevent further writing after closing a socket 2016-08-18 16:41:22 +02:00
Kim Alvefur
4125f016e0 net.server_epoll: Additional logging of connects and TLS 2016-08-18 16:33:12 +02:00
Kim Alvefur
61a9eab50c net.server_epoll: Improve syntax 2016-08-18 16:28:08 +02:00
Kim Alvefur
5d28e09198 net.server_epoll: Remove read timeout when waiting to read more from buffer 2016-08-18 16:12:28 +02:00
Kim Alvefur
0b703f4c2c net.server_epoll: Return early on successful write 2016-08-18 16:06:18 +02:00
Kim Alvefur
136c504e7b net.server_epoll: Don't call ondrain when connection is to be closed 2016-08-18 16:05:18 +02:00
Kim Alvefur
126c1d480f net.server_epoll: Comment some overly verbose logging 2016-08-18 16:02:20 +02:00
Kim Alvefur
816de3fe24 net.server_epoll: Return something as FD when no connection exists 2016-08-18 16:00:51 +02:00
Kim Alvefur
02d7dea382 net.server_epoll: Improve string representation of connections 2016-08-18 15:57:22 +02:00
Kim Alvefur
a297b318cf net.server_epoll: Collect and expose local and remote address and ports 2016-08-18 15:55:50 +02:00
Kim Alvefur
adf465bdfc net.server_epoll: Call callbacks through common method in protected mode 2016-08-18 15:50:18 +02:00
Kim Alvefur
d30bc53476 net.server_epoll: Fix missing quotes in logging call 2016-08-18 02:30:49 +02:00
Kim Alvefur
e4271794f4 net.server_epoll: Add some comments 2016-08-18 01:52:18 +02:00
Kim Alvefur
04b12c3716 net.server_epoll: Clear write flag before calling ondrain, fixes calling of ondisconnect on explicit close 2016-08-16 14:53:29 +02:00