c - Blocking sockets v/s non-blocking sockets in multi-threaded single server multiple client application -
i had been working on server client aplication server going service(sendto + receivefrom)'x' number of clients @ time. purpose, have created 'x' number of threads on server side each thread dadicated 1 single client. inside each thread there specific socket client. thinking make these sockets non-blocking think using blocking socket inside each thread better idea. blocking socket continuously waits receive data , whenever there need send anything, sendto() called. using blocking socket in such situation approach or should use non-blocking sockets?
waiting help!!!
i thinking make these sockets non-blocking think using blocking socket inside each thread better idea. blocking socket continuously waits receive data , whenever there need send anything, sendto() called. using blocking socket in such situation approach or should use non-blocking sockets?
i agree. unless expecting hundreds of thousands of connections, don't see reason go beyond threads , blocking i/o. select()
, friends designed in days when alternative blocking i/o process, not thread.
Comments
Post a Comment