Software / code / prosody
Comparison
plugins/mod_c2s.lua @ 10465:09697a673015
mod_net_multiplex: Add support for using ALPN
Potentially a bit more efficient since it can jump to the selected
protocol on connect instead of waiting for some data to look at.
Adds a 'protocol' field to net providers for this purpose.
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Fri, 29 Nov 2019 23:27:51 +0100 |
| parent | 10379:b917602eac04 |
| child | 10727:fa2a89132dfb |
comparison
equal
deleted
inserted
replaced
| 10464:8d3acf16c404 | 10465:09697a673015 |
|---|---|
| 372 name = "c2s"; | 372 name = "c2s"; |
| 373 listener = listener; | 373 listener = listener; |
| 374 default_port = 5222; | 374 default_port = 5222; |
| 375 encryption = "starttls"; | 375 encryption = "starttls"; |
| 376 multiplex = { | 376 multiplex = { |
| 377 protocol = "xmpp-client"; | |
| 377 pattern = "^<.*:stream.*%sxmlns%s*=%s*(['\"])jabber:client%1.*>"; | 378 pattern = "^<.*:stream.*%sxmlns%s*=%s*(['\"])jabber:client%1.*>"; |
| 378 }; | 379 }; |
| 379 }); | 380 }); |
| 380 | 381 |
| 381 module:provides("net", { | 382 module:provides("net", { |