PDA

View Full Version : Could you tell me where could I found an example of NetSocket and create new Thread



ccthien
08-16-2012, 05:47 AM
Could you tell me where could I found an example of NetSocket and create new Thread

-----------------------

And Seth replied:

Try checking NetHTTP.cpp, it uses NetSocket to implement http type stuff.

NetSocket is very simple to use though:

NetSocket m_socket;

m_socket.Init("rtsoft.com", 80);

m_socket.Update(); //every frame

m_socket.GetBuffer() will return the characters downloaded. Or use .Write() to send something.

-----------------------

Thanks Seth. :-)

ccthien
08-18-2012, 10:46 AM
I have another question:

How can I get my current IP address and using UDP connection?

Seth
12-29-2012, 01:20 PM
I have another question:

How can I get my current IP address and using UDP connection?

Oops, a little late to reply, but I just noticed this..

The only way to reliably get your own IP address is ask an outside site what it is. For instance, some of my games hit http://www.rtsoft.com/ip.php to figure it out.