Websocket Issue Reg.

Discussion in 'Forum Discussion' started by sasidhar, Jan 17, 2015.

  1. sasidhar

    sasidhar Active Member Licensed 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.basic4ppc.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
     
  2. Eumel

    Eumel Active Member Licensed User

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

    --------------
    Eumel
     
  3. sasidhar

    sasidhar Active Member Licensed 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
     
  4. Eumel

    Eumel Active Member Licensed User

    Have you checked the firewall on your router ?
     
  5. sasidhar

    sasidhar Active Member Licensed 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.
     
  6. Eumel

    Eumel Active Member Licensed User

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


    -----------
    Eumel
     
  7. Eumel

    Eumel Active Member Licensed User

    Check both logs ..
    B4J and B4A in Debug mode ..


    ----------
    Eumel
     
  8. sasidhar

    sasidhar Active Member Licensed User

    Yes, tried. not connected

    tried it with: ws://192.168.1.5:51042/push/b4a_ws2 ?
     
  9. sasidhar

    sasidhar Active Member Licensed User

  10. Eumel

    Eumel Active Member Licensed 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
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice