Websocket Issue Reg.

sasidhar

Active Member
Licensed User
Longtime User
Hi all,

I am working on websocket push module which is given here..

Project was updated with the new custom push framework: http://www.b4x.com/android/forum/threads/custom-websocket-based-push-framework.40272/

http://basic4ppc.com:51042/push/index.html

As mentioned by Mr.Erel, i have followed the steps here. downloaded b4J Complied server module as well client.

I have Enabled port 51042 in windows firewall, without running server JAR file in "http://localhost:51042" and could be able to see the B4J examples page in the url and working.

In the client module B4A application ServerlURL I have updated as
Public serverLink As String = "ws://localhost:51042/push/b4a_ws2"

When i run the client application I could see status disconnected. unable to connect from mobile to server.


With B4A server URL also not connecting from Mobile.
Public serverLink As String = "ws://basic4ppc.com:51042/push/b4a_ws2"

Can anyone please let me know what could be the issue.

Thanks
Sasidhar.M
 

Eumel

Active Member
Licensed User
Longtime User
In the client module B4A application ServerlURL I have updated as
Public serverLink As String = "ws://localhost:51042/push/b4a_ws2"

In the B4A application it should not be "localhost". You must set it to the IP where the java-server is running.

--------------
Eumel
 

sasidhar

Active Member
Licensed User
Longtime User
Thanks for Quick reply. how do i know where Java server running. my local iP is 192.168.1.5.
If I run url http://192.168.1.5:51042 then B4J server example page coming. then push example page also comes
http://192.168.1.5:51042/push/index.html

I changed in my B4A application as
Public serverLink As String = "ws://192.168.1.5:51042/ws"
When I run b4A application it is shows disconnected.

Please advice.

Thanks
sasidhar.M
 

sasidhar

Active Member
Licensed User
Longtime User
No, In windows 8 Firewall I have enabled port 51042. Not in DSL Modem. I have Static IP enabled in my router. If I ping static IP from outside pinging well. but with port not not pinging.
 

Eumel

Active Member
Licensed User
Longtime User
Check both logs ..
B4J and B4A in Debug mode ..


----------
Eumel
 

sasidhar

Active Member
Licensed User
Longtime User
Yes, tried. not connected

tried it with: ws://192.168.1.5:51042/push/b4a_ws2 ?
 

Eumel

Active Member
Licensed User
Longtime User
If you have static IP, you must forward the port 51042 to 192.168.1.5 in your router, and change following

Private link As String = "ws://your.static.ip:51042/ws"

----------
Eumel
 
Top