final XMPPTCPConnectionConfiguration.Builder config = XMPPTCPConnectionConfiguration.builder();
config.setXmppDomain(Util.FCM_SERVER); // == "fcm-xmpp.googleapis.com"
//config.setHost(Util.FCM_SERVER);
config.setHostAddress(InetAddress.getByName(Util.FCM_SERVER));
//config.setPort(Util.FCM_PORT);
config.setSecurityMode(ConnectionConfiguration.SecurityMode.disabled);
config.setSendPresence(false);
config.setSocketFactory(SSLSocketFactory.getDefault());
config.setDebuggerEnabled(debuggable); // launch a window with info about packets sent and received
config.setCompressionEnabled(true);
config.setCustomSSLContext(sslContext);
// // Create the connection
connection = new XMPPTCPConnection(config.build());
// // Connect
connection.connect();
I tried to connect like this, but I got the following error. What's wrong with this?<
Exception in thread "main" org.jivesoftware.smack.SmackException$ConnectionException: The following addresses failed: '64.233.188.188:5222' failed because: fcm-xmpp.googleapis.com/64.233.188.188 exception: java.net.ConnectException: Connection timed out: connect
at org.jivesoftware.smack.SmackException$ConnectionException.from(SmackException.java:278)
at org.jivesoftware.smack.tcp.XMPPTCPConnection.connectUsingConfiguration(XMPPTCPConnection.java:619)
at org.jivesoftware.smack.tcp.XMPPTCPConnection.connectInternal(XMPPTCPConnection.java:902)
at org.jivesoftware.smack.AbstractXMPPConnection.connect(AbstractXMPPConnection.java:380)
at com.example.Server.Client.connect(Client.java:122)
at com.example.Server.EntryPoint.main(EntryPoint.java:32)
xmpp fcm
64.233.188.188 Is the daemon bound to 5222 ports on the equipment?
I can't connect. The error message is also when a city timeout occurs when connecting from the client side.
916 When building Fast API+Uvicorn environment with PyInstaller, console=False results in an error
582 PHP ssh2_scp_send fails to send files as intended
573 rails db:create error: Could not find mysql2-0.5.4 in any of the sources
620 Uncaught (inpromise) Error on Electron: An object could not be cloned
© 2024 OneMinuteCode. All rights reserved.