Commit graph

92 commits

Author SHA1 Message Date
Florian Zeitz
1d833bb807 Remove all trailing whitespace 2013-08-09 17:48:21 +02:00
Kim Alvefur
935cf8ba76 Merge 0.9->trunk 2013-07-22 20:29:41 +02:00
Kim Alvefur
4b01c2691b net.server_event: Pass ondrain handler from listener 2013-07-22 18:17:30 +02:00
Matthew Wild
99eea8313f net.server_event: Add support for listener.onreadtimeout(conn), which can return true to prevent the connection from being closed when a read timeout occurs 2013-05-24 14:46:16 +01:00
Kim Alvefur
a7340fef1c net.server*: Allow the TCP backlog parameter to be set in the config 2013-04-27 22:46:01 +02:00
Kim Alvefur
bc1d598375 net.server_event: Remove unused local 2013-03-01 14:15:38 +01:00
Waqas Hussain
a4bef98559 net.server_event: Optimize socket write buffers (don't do buf=buf..newdata). 2013-01-06 04:55:53 +05:00
Kim Alvefur
a79da674d1 net.server_event: Destroy interfaces immediately, fixes reopening of servers. 2012-12-28 14:26:21 +01:00
Kim Alvefur
afd25ad763 net.server_event: Remove comments about not closing event handlers from within callbacks, fixed in luaevent 2012-12-28 14:25:11 +01:00
Matthew Wild
28dfdedc65 net.server_event: Replace usage of string.len() with # operator 2012-07-26 16:46:18 +01:00
Kim Alvefur
7f3c5bae63 net.server_event: Don't emit empty packets, check for errors first. (fixes #287) 2012-07-25 20:33:20 +02:00
Matthew Wild
8a79164f2b net.server_event: Remove unused variables and imports 2012-07-22 23:45:53 +01:00
Matthew Wild
73c5470e83 net.server_select, net.server_event: Change semantics of conn:close() - always call ondisconnect (with err == nil), and never close with data in send buffer (i.e. 'now' parameter removed) 2012-07-22 16:54:33 +01:00
Matthew Wild
81a34bee5e net.server_event: Internal changes to get plain-SSL outgoing connections working (as for HTTPS) 2012-05-24 03:33:14 +01:00
Matthew Wild
6e38fa6d6b net.server_event: Assume wrapclient() is taking a new connection, and call onconnect when appropriate (to match server_select) 2012-05-24 02:55:37 +01:00
Matthew Wild
824fdebc55 net.server_event: Do not automatically close clients when closing a server port 2012-04-24 15:52:30 +01:00
Matthew Wild
5d81665f61 net.server_event: Fix :pause() to actually stop reading from the socket, rather than ignoring socket-readable events (!), and :resume() to restart the event listener 2012-01-16 04:44:23 +00:00
Waqas Hussain
a516177631 net.server_event, net.server_select: Fixed some global pollution. 2011-10-14 00:46:29 +05:00
Waqas Hussain
55f710ce2f net.server_event: Don't call listener.onincoming with data=nil when listener.onconnect is missing. onincoming's arguments shall always be non-nil. 2011-09-03 02:42:50 +05:00
Matthew Wild
72dc9416ef net.server_select, net.server_event: Silence 'error during ssl handshake' for wantread and wantwrite 2011-01-11 05:04:08 +00:00
Matthew Wild
8bb1169606 net.server_event: Log interface and port number when binding fails 2011-01-06 13:47:20 +00:00
Paul Aurich
295773cfbc net.server_event: API parity with net.server_socket 2010-11-21 21:02:31 -08:00
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) 2010-08-22 21:12:22 +01:00
Matthew Wild
cb3354e724 net.server_event: Remove some debug messages 2010-08-02 09:21:14 +01:00
Matthew Wild
a1eb7da955 net.server_event: Fix to not call onconnect a second time after the SSL handshake for starttls connections (thanks Flo) 2010-07-22 11:43:42 +01:00
Matthew Wild
502172efce net.server_event: Remove debug logging from dummy onstatus handler 2010-07-17 15:17:02 +01:00
Waqas Hussain
bbecbdc894 net.server_event: attemp to fix more spelling fail. 2010-06-11 20:35:10 +05:00
Matthew Wild
3883d8dd07 net.server_event: Also return the socket from wrapclient, to maintain compatibility with server_select (thanks uhoreg) 2010-06-02 21:33:44 +01:00
Matthew Wild
a22e222865 net.server_select, net.server_event: Add server.link() to link 2 connections with an intermediate buffer of the specified size 2010-05-05 15:25:48 +01:00
Matthew Wild
3c7eb58b08 net.server_select, net.server_event: Support for ondrain listener callback for when send buffer is empty 2010-05-05 15:24:24 +01:00
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 2010-05-05 15:23:17 +01:00
Matthew Wild
c51d0beea7 net.server_select, net.server_event: Support for :pause() and :resume() on connections 2010-05-05 15:21:17 +01:00
Matthew Wild
93b148715f net.server_event: Be sure to fire onincoming for backwards-compatibility with pre-onconnect listeners (thanks darkrain/mod_console) 2010-05-05 11:24:45 +01:00
Matthew Wild
e0c9c76b44 net.server_event: Call listener.onconnect if it exists, otherwise stick to listener.onincoming 2010-04-11 01:29:59 +01:00
Waqas Hussain
13c9d77ff4 net.server_event: Fixed spelling fail. 2010-03-26 08:24:29 +05:00
Matthew Wild
3a47c0c173 net.server_event: Don't re-try a write if the connection closed (thanks Flo) 2010-03-25 12:32:25 +00:00
Matthew Wild
ef00aa87e4 net.server_event: Bump timeout values up somewhat 2010-03-24 22:46:57 +00:00
Matthew Wild
52817c5517 net.server_event: Fix some global accesses 2010-03-01 18:46:37 +00:00
Matthew Wild
f1871510b7 net.server_event: Improve and fix potential traceback in logging of new incoming connections 2010-03-01 16:45:13 +00:00
Matthew Wild
43052f3253 net.server_event: Add lock_read() method to connections 2010-02-25 02:01:00 +00:00
Matthew Wild
ec83dc97ee net.server_event: Pass false as connection error to disconnect handler if close was initiated by us 2010-02-18 16:41:53 +00:00
Matthew Wild
bdcaada368 net.server_event: Increase SSL handshake timeout to 30s, make handshake round-trip count configurable, and bump connect timeout to 20s (thanks Flo) 2010-02-17 13:21:33 +00:00
Matthew Wild
673df8d1d2 net.server_event: Fire onincoming() callback for new connections as opposed to the new onconnect() - let's change this for a future version though 2010-02-14 20:47:09 +00:00
Matthew Wild
606d78db9c net.server_event: Fix another instance of creating an SSL context - certmanager now does this 2010-02-14 20:36:54 +00:00
Matthew Wild
e7b5d8c9c1 net.server_event: Fix traceback in creating SSL context 2010-02-14 20:15:17 +00:00
Matthew Wild
6a135d14bd net.server_event: Fixes for traceback with no LuaSec 2010-02-11 21:32:49 +00:00
Matthew Wild
4ee9b095dd net.server_event: Update for compatibility with new server API 2010-01-31 19:58:52 +00:00
Matthew Wild
fd8c12ab1a net.server_event: Trailing whitespace 2010-01-29 16:49:43 +00:00
Matthew Wild
bf63594f0f net.server_event: Support :setlistener() method on connections to work with port multiplexing 2010-01-29 16:46:28 +00:00
Matthew Wild
4ec0f47224 net.server_{select,event}: Fail gracefully if socket doesn't have a setoption method (LuaSec issue I think) 2010-01-21 12:56:08 +00:00