Development question, networking on the wii?

Discussion in 'Wii - Emulation and Homebrew' started by nulln, Jul 31, 2018.

  1. nulln
    OP

    nulln Newbie

    Newcomer
    1
    Jul 28, 2018
    Australia
    What would be the easiest way to go about sending requests to a server, and getting a response?

    I'm trying to make a request to my server and use query strings to pass data. Something like
    Code:
    site.example/make_request?heressomedata=hello&additionaldata=sup
    Then I could return the response from the server in json, have the wii read it, and boom! client-server communication. But before I can do any of that, I need to know how to even send data to the server in the first place.
     
  2. GreyWolf

    GreyWolf GBAtemp Guru

    Member
    8
    Mar 2, 2015
    United States
    The console has no HTTP stack so you'll have to bring your own. You can use bushing's. It's what most homebrew seems to use. I don't think it was ever in a repository so you can just grab http.c and http.h from another project like Nintendont.
     
    nulln and kaisersozeh like this.
  3. newo

    newo GBAtemp Regular

    Member
    4
    Apr 7, 2011
    Jamaica
  4. nulln
    OP

    nulln Newbie

    Newcomer
    1
    Jul 28, 2018
    Australia
    Sorry I'm a couple days late, but with a bit of finicking I got newo's example to compile. I've tried to use the http.c files, I came across them from WiiMC. I would have gone with that if I could have gotten it to work. Thank you both so much, you've been a great help! :D
     
  5. newo

    newo GBAtemp Regular

    Member
    4
    Apr 7, 2011
    Jamaica
    Always glad to help when I can especially since there are not many people into wii homebrew dev.

    One issue I had with http is that some servers might take upto 15 seconds to respond to each request, this happen because of a issue with http headers. Might not be something you need to worry about right now but if comes up let us know.
     
Loading...