U++ framework
Do not panic. Ask here before giving up.

Home » U++ Library support » U++ MT-multithreading and servers » Non-Blocking socket example
Re: Socket non block [message #9119 is a reply to message #9116] Wed, 18 April 2007 10:40 Go to previous messageGo to previous message
fallingdutch is currently offline  fallingdutch
Messages: 258
Registered: July 2006
Experienced Member
You can use UPP-Sockets nonblocking

you need the Package "Web" and "Web/SSL" if you need SSL support

Then these two functions create sockets for you.
bool ServerSocket(Socket& socket, int port, bool nodelay = true, int listen_count = 5, bool is_blocking = true);
bool ClientSocket(Socket& socket, const char *host, int port, bool nodelay = true, dword *my_addr = NULL, int timeout = DEFAULT_CONNECT_TIMEOUT, bool is_blocking = true);

Set "is_blocking" to false.

Socket::Wait is a call to select


Bas
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message icon11.gif
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Again ReadMemoryBarrier() etc
Next Topic: Threading example for U++
Goto Forum:
  


Current Time: Sun Jun 21 18:16:24 GMT+2 2026

Total time taken to generate the page: 0.00715 seconds