robbiehanson / XMPPFramework

An XMPP Framework in Objective-C for Mac and iOS
Other
5.91k stars 2.09k forks source link

unable to connect when changing xmpp host port #1152

Open khoaopentechiz opened 4 years ago

khoaopentechiz commented 4 years ago

I want to change the default xmpp host port (at my region, the service provider blocks port 5222 for 4g connection).

My xmpp server (prosody) is running on port 7000 , but when i tried to change the xmpp stream host port to 7000, i got this error: Error Domain=NSPOSIXErrorDomain Code=61 "Connection refused" UserInfo={NSLocalizedDescription=Connection refused, NSLocalizedFailureReason=Error in connect() function}

The problem is, I actually capture the packets coming to my server on port 7000, and there is no packet coming from my iphone. But if I capture the packets on port 5222, there are packets that come from the iphone (testing with wifi, not 4g).

So, for some reason, the packets from port 5222 is sent to the server, while the packets from port 7000 is blocked. Have anyone came across this problem?