Software /
code /
prosody
Diff
net/server_event.lua @ 2374:9b6a9d521620
net.server_event: Add :serverport() method to be compatible with old API
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Thu, 17 Dec 2009 20:30:10 +0000 |
parent | 2367:22dc9005360f |
child | 2375:31297a5641e3 |
line wrap: on
line diff
--- a/net/server_event.lua Thu Dec 17 20:28:32 2009 +0000 +++ b/net/server_event.lua Thu Dec 17 20:30:10 2009 +0000 @@ -352,6 +352,10 @@ return self._port end + function interface_mt:serverport() + return self._serverport + end + function interface_mt:ip() return self._ip end @@ -464,6 +468,7 @@ -- 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; }