Created
April 4, 2010 16:12
-
-
Save Mon-Ouie/355493 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
VALUE Wlan_init(VALUE self) { | |
int err; | |
sceUtilityLoadNetModule(PSP_NET_MODULE_COMMON); | |
sceUtilityLoadNetModule(PSP_NET_MODULE_INET); | |
sceUtilityLoadNetModule(PSP_NET_MODULE_PARSEURI); | |
sceUtilityLoadNetModule(PSP_NET_MODULE_PARSEHTTP); | |
sceUtilityLoadNetModule(PSP_NET_MODULE_HTTP); | |
sceUtilityLoadNetModule(PSP_NET_MODULE_SSL); | |
err = sceNetInit(0x20000, 0x20, 0x1000, 0x20, 0x1000); | |
if (err < 0) | |
rb_raise(rb_eRuntimeError, "Failled to init net module"); | |
err = sceNetInetInit(); | |
if (err < 0) | |
rb_raise(rb_eRuntimeError, "Failled to init inet module"); | |
err = sceNetResolverInit(); | |
if (err < 0) | |
rb_raise(rb_eRuntimeError, "Failled to init resolver"); | |
err = sceNetApctlInit(0x1400, 0x42); | |
if (err < 0) | |
rb_raise(rb_eRuntimeError, "Failled to init apctl"); | |
err = sceSslInit(15 * 1024); | |
if (err < 0) | |
rb_raise(rb_eRuntimeError, "Failled to init ssl"); | |
err = sceHttpInit(30 * 1024); | |
if (err < 0) | |
rb_raise(rb_eRuntimeError, "Failled to init http"); | |
err = sceHttpsInit(0, 0, 0, 0); | |
if (err < 0) | |
rb_raise(rb_eRuntimeError, "Failled to init https"); | |
err = sceHttpsLoadDefaultCerts(0, 0); | |
if (err < 0) | |
rb_raise(rb_eRuntimeError, "Failled to load default certificates"); | |
return Qnil; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment