Mercurial > prosody-hg
comparison 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 |
| parents | 22dc9005360f |
| children | 31297a5641e3 |
comparison
equal
deleted
inserted
replaced
| 2373:13090fc6ad90 | 2374:9b6a9d521620 |
|---|---|
| 350 | 350 |
| 351 function interface_mt:port() | 351 function interface_mt:port() |
| 352 return self._port | 352 return self._port |
| 353 end | 353 end |
| 354 | 354 |
| 355 function interface_mt:serverport() | |
| 356 return self._serverport | |
| 357 end | |
| 358 | |
| 355 function interface_mt:ip() | 359 function interface_mt:ip() |
| 356 return self._ip | 360 return self._ip |
| 357 end | 361 end |
| 358 | 362 |
| 359 function interface_mt:ssl() | 363 function interface_mt:ssl() |
| 462 startsslcallback = false; -- starting handshake callback | 466 startsslcallback = false; -- starting handshake callback |
| 463 position = false; -- position of client in interfacelist | 467 position = false; -- position of client in interfacelist |
| 464 | 468 |
| 465 -- Properties | 469 -- Properties |
| 466 _ip = ip, _port = port, _server = server, _pattern = pattern, | 470 _ip = ip, _port = port, _server = server, _pattern = pattern, |
| 471 _serverport = (server and server:port() or nil), | |
| 467 _sslctx = sslctx; -- parameters | 472 _sslctx = sslctx; -- parameters |
| 468 _usingssl = false; -- client is using ssl; | 473 _usingssl = false; -- client is using ssl; |
| 469 } | 474 } |
| 470 if not sslctx then | 475 if not sslctx then |
| 471 interface.starttls = false -- don't allow TLS | 476 interface.starttls = false -- don't allow TLS |
