Bidirectional nature of sockets
Posted on 2012-04-05
Please correct me if I'm wrong on any of this and maybe throw in some goodies?
I would like to set up a client and server that communicate over a socket. It is my understanding that I can write or read to this socket at any time, thus, the client and server may both contain a read and write thread (so 4 threads if client and server happen to be on the same machine). Is is ok if the read thread polls and reads every so often while the write thread writes? i.e., on one socket, are there two separate channels that don't affect eachother at all?