If anyone with homebrew knowledge could please help me out.
I'm trying to developed client/server application where the client is the DS and server is the PC, I've tried using the HTTPGET example code in the devkitpro examples, I'm able to connect to other HTTP servers, but when I try to connect to mine it always fails, fails at the line:
connect( my_socket,(struct sockaddr *)&sain, sizeof(sain) );
I've disabled firewall on port 80, I'm able to access the HTTP page through firefox by typing my IP address, but when I try to connect with the DS it doesn't accept (I've tried this in both Desmume and actual DS hardware).
The code before the connect is this:
-------------------------------------------------------------------------
struct hostent * myhost = gethostbyname( url );
iprintf("Found IP Address!\n");
// Create a TCP socket
int my_socket;
my_socket = socket( AF_INET, SOCK_STREAM, 0 );
iprintf("Created Socket!\n");
// Tell the socket to connect to the IP address we found, on port 80 (HTTP)
struct sockaddr_in sain;
sain.sin_family = AF_INET;
sain.sin_port = htons(80);
sain.sin_addr.s_addr= *( (unsigned long *)(myhost->h_addr_list[0]) );
-------------------------------------------------------------------------
I'd greatly appreciate any help !
I'm trying to developed client/server application where the client is the DS and server is the PC, I've tried using the HTTPGET example code in the devkitpro examples, I'm able to connect to other HTTP servers, but when I try to connect to mine it always fails, fails at the line:
connect( my_socket,(struct sockaddr *)&sain, sizeof(sain) );
I've disabled firewall on port 80, I'm able to access the HTTP page through firefox by typing my IP address, but when I try to connect with the DS it doesn't accept (I've tried this in both Desmume and actual DS hardware).
The code before the connect is this:
-------------------------------------------------------------------------
struct hostent * myhost = gethostbyname( url );
iprintf("Found IP Address!\n");
// Create a TCP socket
int my_socket;
my_socket = socket( AF_INET, SOCK_STREAM, 0 );
iprintf("Created Socket!\n");
// Tell the socket to connect to the IP address we found, on port 80 (HTTP)
struct sockaddr_in sain;
sain.sin_family = AF_INET;
sain.sin_port = htons(80);
sain.sin_addr.s_addr= *( (unsigned long *)(myhost->h_addr_list[0]) );
-------------------------------------------------------------------------
I'd greatly appreciate any help !