Search found 5 matches

by acidice333
Tue Sep 07, 2010 10:21 pm
Forum: devkitPPC
Topic: net_socket problem
Replies: 5
Views: 8194

Re: net_socket problem

Ok looks like I've figured out. I needed to set... server.sin_len = 8; // without this set to 8? it wont work (returns -22 on send) And then use.. n = net_sendto(sock,buf,sizeof(buf),0,(struct sockaddr*)&server,server.sin_len); On net_sendto before `server.sin_len` it was `sizeof(struct sockaddr...
by acidice333
Tue Sep 07, 2010 8:33 pm
Forum: devkitPPC
Topic: net_socket problem
Replies: 5
Views: 8194

Re: net_socket problem

Ok now I get connection = 0 with this. s32 connection = net_socket (PF_INET, SOCK_DGRAM, IPPROTO_IP) From looking at network.h it looks as tho PF_INET and AF_INET are the same (one defines into the other) #define AF_UNSPEC 0 #define AF_INET 2 #define PF_INET AF_INET #define PF_UNSPEC AF_UNSPEC Here ...
by acidice333
Tue Sep 07, 2010 2:59 am
Forum: devkitPPC
Topic: net_socket problem
Replies: 5
Views: 8194

net_socket problem

I'm trying to open a socket with SOCK_DGRAM UDP but its returning -1. When I change this to SOCK_STREAM TCP it opens a socket fine. Is UDP broken? s32 connection = net_socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); if (connection < 0) GRRLIB_Printf(95, 25, tex_BMfont5, GRRLIB_LIME, 1, "could not ope...
by acidice333
Fri Sep 03, 2010 8:21 am
Forum: devkitPPC
Topic: struct int problem
Replies: 4
Views: 7124

Re: struct int problem

Thank you very much! I've been struggling with this for days and I finally got it working :)

What I found out is if I htonl() on the PC server side, I don't need ntohl() on the Wii client side but I figure it'd be best to to ntohl() it just incase.
by acidice333
Thu Sep 02, 2010 2:47 am
Forum: devkitPPC
Topic: struct int problem
Replies: 4
Views: 7124

struct int problem

Hi there. So I'm trying to create an application for Wii that communicates with my PC. The problem I've got is `char` works, but when I use `int` it doesn't work properly. The `int` either displays a number that is totally off, or it just renders the screen to nothing. I made a PC client, and it wor...