Welcome! Log In Create A New Profile

Advanced

libcurl port

Posted by gave92 
libcurl port
February 27, 2012 10:27PM
Hi all!
I'm not sure if anyone still cares about wii homebrews but..
I'm developing a homebrew web browser for the wii (yes I'm crazy)
and I need help.
I started coding from wiixplore and I can now download any file to the sd card and somehow render html pages.
I'm trying to add https support through the libcurl library but although i can compile it, it does not work because wii lacks these functions: getpeername, getsockname, getaddressinfo. Is there something i can do for these functions? Or there is an other way to get https working on wii?

sorry for my bad english,
any advice is appreciated.
thanks

EDIT:
I found that the problem is the select() function (getpeername, ecc.. are not necessary): it returns "-22", perhaps it does not even exist on wii.
Does anyone know a way to fix it?



Edited 2 time(s). Last edit at 02/28/2012 03:50PM by gave92.
Re: libcurl port
February 29, 2012 03:30AM
wow can it render full webpages... you should emial me a beta version


(edit) is it capable of downloading mp3s if so please email me a beta slipknotmaggot1213@gmail.com PLZ
Re: libcurl port
February 29, 2012 04:54AM
Quote
slipknot1213
wow can it render full webpages... you should emial me a beta version
(edit) is it capable of downloading mp3s if so please email me a beta blahblahblah@blah.com PLZ
That is not a productive post. Don't do it again.
Re: libcurl port
February 29, 2012 05:52AM
Quote
gave92
I found that the problem is the select() function (getpeername, ecc.. are not necessary): it returns "-22", perhaps it does not even exist on wii. Does anyone know a way to fix it?

net_select() isn't implemented in libogc. The solution is to use net_poll(). tueidj posted some corrected poll constants for net_poll() in this message.
Re: libcurl port
February 29, 2012 08:09AM
Note also that IOS can handle SSL connections for you, the information is on wiibrew but hasn't been implemented in libogc.
Re: libcurl port
February 29, 2012 12:46PM
It wooorks!!
I only had to configure libcurl to use poll function (with the correct constants) instead of select and
to replace the definition of "struct fd" with the "struct sd" from network.h.
Thank you all for your answers.
Re: libcurl port
October 15, 2012 05:42PM
HI, im trying to port an app that uses select() for sockets, what do you did exactly?
¿defining POLLOUT=0x0008, POLLERR=0x0020, POLLHUP=0x0040, POLLNVAL=0x0080 in libogc/include/network.h?, where do you change the struct fd, i only see an struct fd_set in this file.

Thanks :)
Re: libcurl port
December 07, 2012 04:11PM
Hello,
as far as i know the select() function does not work on wii.
you have to use poll() function instead, with the correct costants.
(defining POLLOUT=0x0008, POLLERR=0x0020, POLLHUP=0x0040, POLLNVAL=0x0080 in libogc/include/network.h should be ok)
forget the struct fd-about thing, it's related to libcurl only
Sorry, only registered users may post in this forum.

Click here to login