Build-A-Burger
Full Member level 1
I'm developing a sockets client/server application (embedded linux using pthreads) where the server has threads already created for each client on the network. My question is: can I have a separate thread for each client's socket read and write that run independently (the socket can be read from and written to simultaneously). I guess I need to use either semaphores or mutexes. I don't think I need to worry about each client connection on the server, but just the read/write of each socket connection. To put my question another way: will the read thread on one socket block the write thread on the same socket?