Software /
code /
prosody
Changeset
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 (2009-12-17) |
parents | 2373:13090fc6ad90 |
children | 2375:31297a5641e3 |
files | net/server_event.lua |
diffstat | 1 files changed, 5 insertions(+), 0 deletions(-) [+] |
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; }