facebook

Socket connection to a Webserver

💡
Our Forums Have Moved

For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub

  1. MobiOne Archive
  2.  > 
  3. Getting Help – General
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #332694 Reply

    BTM
    Member

    Hey,

    I want to make a socket connection to a Webserver, is this possible with javascript in MobiOne?

    #332713

    support-michael
    Keymaster

    Can you share some details about the type of io and life-span for the socket connection? For example are your running a mud game or working with realtime events, …?

    MobiOne applications are based on HTML5 and the hybrid app model (see the Cordova/PhoneGap runtime framework)

    The option that comes to mind is websockets assuming you only want to target iOS6 devices, see http://caniuse.com/#feat=websockets I am not aware of other web-based options for classic socket io. Based on your io needs there may be alternative approaches to consider. Can’t say without more details.

    #332796

    BTM
    Member

    I just want to send a request to the web server that should send a reply back, not more.
    I dont want to target only iOS6 devices so is there another way except using the html5 websockets?

    #332799

    support-michael
    Keymaster

    >I just want to send a request to the web server that should send a reply back, not more.

    I reread your request and maybe I misunderstood originally. Is your need to do a simple request/reply from server similar to if you click a link in a webpage? If yes, this is very doable. Can you briefly describe what parameters are being sent to the server and what type of data is returned and what you need to do with the data (e.g., a html webpage, xml or json data, …)?

    #332804

    BTM
    Member

    I have an IP and a port of a server, now I want to send him a request. (This request is called “GETPORT;”.) The server recognizes the request (“GETPORT;”) and sends a number back. This number I want to store in a variable. Is this possible (maybe with socket.io?)? If yes, how?

    #332805

    support-michael
    Keymaster

    > Is this possible (maybe with socket.io?)? If yes, how?

    I don’t think this is possible from javascript without connecting to a socket server. I was originally thinking of socket.io and other libs. The technique I have seen in the past is to use underlying flash network mechanism on desktops but that is N/A on our mobile platforms.

    Let me discuss with our dev team for other ideas.

    #332896

    BTM
    Member

    Hey,

    have you found any solution ideas?

    #332906

    support-michael
    Keymaster

    @BTM

    We don’t know of a solution for general socket communications from a HTML5 app such as those created by MobiOne.

Viewing 8 posts - 1 through 8 (of 8 total)
Reply To: Socket connection to a Webserver

You must be logged in to post in the forum log in