Connection Error!

CODE:

{

connection.username = username.text;
connection.password = password.text;
connection.server = ser.text; (serverIP:10.1.1.161, Client IP 10.1.1.19)
connection.port = 5222;
connection.connect(“flash”);

}

But it’s Failed ! In Debug model, XMPPConnection dispatches EVENT.CLOSE event,But I don’t konw why dispatch this event!

if I change the server to localhost .All Works!