iOS Question Websockets Question

Discussion in 'iOS Questions' started by tufanv, Jan 14, 2019 at 1:24 PM.

  1. tufanv

    tufanv Expert Licensed User

    Hello,

    I am currently using httputils2 to get json data from mysql server on my server. I want to switch to websockets. Where should I start ? Is this server example valid for me:

    https://www.b4x.com/android/forum/threads/websocket-client-library.40221/

    I don't understand where I push the data to b4a and b4i apps.
    is it this part ?:

    Code:
    ws.RunFunction("ServerTime"Array As Object(DateTime.Time(DateTime.Now)))
        ws.Flush
    So instead of servertime , I need to push my mysql database info which has 100 rows for the currencies. should I send all the data together as json and push it to devices and in b4i and b4a apps , get the data from this socket ?

    I am a bit lost about this, is what I am thinking is the correct way ?

    And also what method can I use to limit the websocket connections to my own apps only, to avoid other people use it ?


    Thanks
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    Yes.

    Yes.

    Start with a small example and learn the basics of WebSockets.

    You can send the username and password after the connection.
     
    tufanv likes this.
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