mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2025-09-09 10:19:41 +02:00
Introduce websocket module into smack
This commit is contained in:
parent
5d32735ad7
commit
7ed29b9d5f
39 changed files with 1943 additions and 3 deletions
|
@ -44,6 +44,7 @@ import org.jivesoftware.smack.tcp.XMPPTCPConnection;
|
|||
import org.jivesoftware.smack.tcp.XMPPTCPConnectionConfiguration;
|
||||
import org.jivesoftware.smack.util.MultiMap;
|
||||
import org.jivesoftware.smack.util.StringUtils;
|
||||
import org.jivesoftware.smack.websocket.XmppWebsocketTransportModuleDescriptor;
|
||||
|
||||
import org.jivesoftware.smackx.admin.ServiceAdministrationManager;
|
||||
import org.jivesoftware.smackx.iqregister.AccountManager;
|
||||
|
@ -86,6 +87,15 @@ public class XmppConnectionManager {
|
|||
.applyExtraConfguration(cb -> cb.removeModule(CompressionModuleDescriptor.class))
|
||||
.build()
|
||||
);
|
||||
addConnectionDescriptor(
|
||||
XmppConnectionDescriptor.buildWith(ModularXmppClientToServerConnection.class, ModularXmppClientToServerConnectionConfiguration.class, ModularXmppClientToServerConnectionConfiguration.Builder.class)
|
||||
.withNickname("modular-websocket")
|
||||
.applyExtraConfguration(cb -> {
|
||||
cb.removeAllModules();
|
||||
cb.addModule(XmppWebsocketTransportModuleDescriptor.class);
|
||||
})
|
||||
.build()
|
||||
);
|
||||
} catch (NoSuchMethodException | SecurityException e) {
|
||||
throw new AssertionError(e);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue