01-08-2005, 10:39 AM
2 things: First, has anyone got any idea what the socket struct is? I've looked and failed to find one.
Secondly, has anyone ever actually used SDLNet in it's native environment before? I've gotten the following which works right up until the send where it fails. Does the code I have so far seem correct from a C perspective?
Secondly, has anyone ever actually used SDLNet in it's native environment before? I've gotten the following which works right up until the send where it fails. Does the code I have so far seem correct from a C perspective?
Code:
'***************SDLNET****************
result = SDLNet_Init
print "SDL_Init result:", result
dim IP as IPAddress
dim Socket as any ptr
result = SDLNet_ResolveHost (IP, "www.google.com", 80)
print "SDLNET_Resolve host result:", result
socket = SDLNet_TCP_Open (ip)
Send$ = "head /index.html"
print *socket
result = SDLNet_TCP_Send (socket, @send$, len(send$))
print "SDLNet_TCP_Send Result:" ;result; " Should be:";len(send$)
SDLNet_Quit
'**************END SDLNET*************