Changeset

6047:4db0403bfc0d

net.server_{select,event}: Add compat code for supporting the same client port API on connections
author Kim Alvefur <zash@zash.se>
date Tue, 01 Apr 2014 15:26:40 +0200
parents 6046:b7dd7b8165df
children 6048:e447601cf13c 6049:6d410ffd6e13
files net/server_event.lua net/server_select.lua
diffstat 2 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/net/server_event.lua	Mon Mar 31 19:38:06 2014 +0200
+++ b/net/server_event.lua	Tue Apr 01 15:26:40 2014 +0200
@@ -367,6 +367,7 @@
 	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"
--- a/net/server_select.lua	Mon Mar 31 19:38:06 2014 +0200
+++ b/net/server_select.lua	Tue Apr 01 15:26:40 2014 +0200
@@ -397,6 +397,7 @@
 	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