Some protocols require the reads and the writes to be interlaced. That is:
write read write read write readOther protocols, such as HTTP 1.0, have multiple writes, followed by multiple reads, like this:
write write write read read read readOther protocols don't care and allow client requests and server responses to be freely intermixed.
Java places no restrictions on reading and writing to sockets. One thread can read from a socket while another thread writes to the socket at the same time. (How does this differ from one thread reading a file while another thread writes to the file?)