multithreading - C - how select() understand a connection from same client -


i have question, think more theoretical pratical.

i have server, receives connections clients, select() function.

server has pattern master-slave slave threads take file descriptor master , manage request specific client.

(every request client start connection request)

i think select() function must understand same client asks requests, because if same client asks 2 requests , select function can't understand same client, select create 2 file descriptor same client accept() , after 2 different threads manage different request same client , think can create lot of concurrency problems because different threads write in different file descriptors real channel client same.

so, know, how can select() recognise client after first request?


Comments

Popular posts from this blog

Sort a complex associative array in PHP -

vb.net - How to ignore if a cell is empty nothing -

recursion - Can every recursive algorithm be improved with dynamic programming? -