I run the smakc api,I find a problem
when i run the code blews that it works very good.
public static void main(String[] args) throws XMPPException {
XMPPConnection connection=new XMPPConnection(“localhost”);
connection.login(“web1”,“web1”);
}
but when i change localhost to my ip,it can work
public static void main(String[] args) throws XMPPException {
XMPPConnection connection=new XMPPConnection(“172.16.80.23”);
//172.16.80.23 is the ip of the localhost
connection.login(“web1”,“web1”);
}
the error message is:
No response from the server.:
at org.jivesoftware.smack.XMPPConnection.login(XMPPConnection.java:276)
at org.jivesoftware.smack.XMPPConnection.login(XMPPConnection.java:237)
at test.Test2.main(Test2.java:26)