Server recognition of String and Value of that string

  • pabitrapadhy
    Likes 0

    Problem Description

    Hello there,

    I have a question about the networking POST video on YouTube.
    I saw you are sending data to the server.

    How the string sent from HttpClient will be interpreted into values associated with that String inside your server ?
    Is there any backend implementation to support that, any hidden code ?

    How different would be that in different languages used for server ?
    I am confused about how it used the string to interpret that these values (that also present inside the string) is of that particular variable.
    Also how could you save that in server ?

  • Sonar Systems admin
    Likes 0

    No hidden code, you send it via Cocos2d-x to a website that gets it based on the name assigned to the data and that webpage does something with the data.

  • pabitrapadhy
    Likes 0

    Yes, that’s true.

    But then that’s the question remains.
    How is the webpage is decoding the string like that you have used – “ValueX=200 and ValueY=300”
    into two different parameters and save it’s value to the respective variables used in your webpage.

    One thing that I could understood is that, yeah might be strstr() is used to find the string present in that
    but how it takes the value from within the string.. ??

  • Sonar Systems admin
    Likes 0

    You dont need to worry about that as string is just a paramater that gets handled and sent behind the scenes for Cocos2d-x.

Login to reply