I am trying to connect ejabberd server from Java using the Smack API. When I am using the following code I could connect to ejabberd server.
XMPPTCPConnection connection = new XMPPTCPConnection("localhost");
connection.connect();
However, while I am using ConnectionConfiguration in the following manner it shows Connection Exception Or No Response error.
ConnectionConfiguration conf = new ConnectionConfiguration("localhost",5280);
conf.setReconnectionAllowed(false);
XMPPTCPConnection connection = new XMPPTCPConnection(conf);
connection.connect();
I could not able to solve the problem. Please help .