Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

synchronizing socket reads/writes in a multi-client server application

Status
Not open for further replies.

Build-A-Burger

Full Member level 1
Full Member level 1
Joined
Oct 27, 2010
Messages
95
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Location
Wyoming
Activity points
2,102
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?
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top