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();
이렇게 연결을 시도했는데 아래와 같은 에러를 얻었습니다. 이게 어디가 잘못된 걸까요??ㅠ
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)