[SDL] SDL_net : Own IP/Port?

simon simon at tanygrisiau.com
Mon Jul 29 12:17:00 PDT 2002


If I setup a listening port with.. 
udpSocket = SDLNet_UDP_Open(0);

How can I find what port was actually opened?
I have tried..
tempIPAddress = SDLNet_UDP_GetPeerAddress(udpSocket, -1);
But as reported in docs it only returns info on the port that was specified
with SDLNet_UDP_Open(port);

Im really just after the port number.  Any ideas would be greatly appreciated.
I know gethostname will get the IP, but this is not a part of SDL_net :(

Regards,

Si.




More information about the SDL mailing list