in a server client communication which uses Socket and ServerSocket classes of java, think that client is sending some information byte by byte,
and server is reading in the same way (byte by byte), then replies.
what i cannot figure out is: when does the server start reading the bytes which are sent by client.
does it wait until all bytes arrived?
or does it immediately read when 1 byte is written to the related port.
or does this behaviour is determined by the streams used in communication
(DataInputstrea m, DataOutputStrea m etc...)?
or is it about flushing? (some streams may have auto flush or something like that)
and server is reading in the same way (byte by byte), then replies.
what i cannot figure out is: when does the server start reading the bytes which are sent by client.
does it wait until all bytes arrived?
or does it immediately read when 1 byte is written to the related port.
or does this behaviour is determined by the streams used in communication
(DataInputstrea m, DataOutputStrea m etc...)?
or is it about flushing? (some streams may have auto flush or something like that)
Comment