我尝试通过这段代码启用流管理(XEP-0198)
XMPPTCPConnectionConfiguration connConfig = XMPPTCPConnectionConfiguration.builder().setHost(HOST)
.setPort(PORT).setDebuggerEnabled(true).setSecurityMode(SecurityMode.disabled)
.setUsernameAndPassword(USERNAME, PASSWORD).setServiceName(SERVICE).build();
XMPPTCPConnectionconnection = new XMPPTCPConnection(connConfig);
connection.setPacketReplyTimeout(TIME_OUT);
connection.connect();
connection.login();
connection.setUseStreamManagement(true);
但后来当我检查流管理时,它返回 false。