aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2009-12-17 20:30:10 +0000
committerMatthew Wild <mwild1@gmail.com>2009-12-17 20:30:10 +0000
commitc5377ba75fa5aa15cbb04c565d2d3d4520145cb9 (patch)
tree6782decbfc66021a49be1d71f8f3202b103dbf98 /net
parent68bacb8be140c2d546b40be2a91336f55cb832e2 (diff)
downloadprosody-c5377ba75fa5aa15cbb04c565d2d3d4520145cb9.tar.gz
prosody-c5377ba75fa5aa15cbb04c565d2d3d4520145cb9.zip
net.server_event: Add :serverport() method to be compatible with old API
Diffstat (limited to 'net')
-rw-r--r--net/server_event.lua5
1 files changed, 5 insertions, 0 deletions
diff --git a/net/server_event.lua b/net/server_event.lua
index bcdd6ad1..2f9ab7d9 100644
--- a/net/server_event.lua
+++ b/net/server_event.lua
@@ -352,6 +352,10 @@ do
return self._port
end
+ function interface_mt:serverport()
+ return self._serverport
+ end
+
function interface_mt:ip()
return self._ip
end
@@ -464,6 +468,7 @@ do
-- Properties
_ip = ip, _port = port, _server = server, _pattern = pattern,
+ _serverport = (server and server:port() or nil),
_sslctx = sslctx; -- parameters
_usingssl = false; -- client is using ssl;
}