From c9df5f31d2f0ceef9e5c4e471eb2fe8be4334d9a Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Thu, 27 Mar 2014 23:02:52 +0100 Subject: net.server_event: Rename conn:port() -> conn:clientport() to match server_select --- net/server_event.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/server_event.lua b/net/server_event.lua index e320b15c..c4aa7be4 100644 --- a/net/server_event.lua +++ b/net/server_event.lua @@ -352,7 +352,7 @@ do return self._server or self; end - function interface_mt:port() + function interface_mt:clientport() return self._port end -- cgit v1.2.3 From e6321729335e91af8e8655e037586c2987ed75c4 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Mon, 31 Mar 2014 19:38:06 +0200 Subject: Backed out changeset a5b5bce71a11 --- net/server_event.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/server_event.lua b/net/server_event.lua index c4aa7be4..e320b15c 100644 --- a/net/server_event.lua +++ b/net/server_event.lua @@ -352,7 +352,7 @@ do return self._server or self; end - function interface_mt:clientport() + function interface_mt:port() return self._port end -- cgit v1.2.3 From 8cf56e87aca20c4b09b56c0887464871d6eeab75 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Tue, 1 Apr 2014 15:26:40 +0200 Subject: net.server_{select,event}: Add compat code for supporting the same client port API on connections --- net/server_event.lua | 1 + net/server_select.lua | 1 + 2 files changed, 2 insertions(+) diff --git a/net/server_event.lua b/net/server_event.lua index e320b15c..25799640 100644 --- a/net/server_event.lua +++ b/net/server_event.lua @@ -367,6 +367,7 @@ do function interface_mt:ssl() return self._usingssl end + interface_mt.clientport = interface_mt.port -- COMPAT server_select function interface_mt:type() return self._type or "client" diff --git a/net/server_select.lua b/net/server_select.lua index 22887265..4bda3ef0 100644 --- a/net/server_select.lua +++ b/net/server_select.lua @@ -397,6 +397,7 @@ wrapconnection = function( server, listeners, socket, ip, serverport, clientport handler.clientport = function( ) return clientport end + handler.port = handler.clientport -- COMPAT server_event local write = function( self, data ) bufferlen = bufferlen + #data if bufferlen > maxsendlen then -- cgit v1.2.3