Question regarding Socket#read

Hi !

Look at this code :

socket = TCPSocket.open(host, port)
socket.read(1)
socket.read(1)
socket.read(1)
socket.close

Will these read calls trigger 3 TCP round trip or does Ruby have some
kind of buffering for receiving data ?

Thank you ! :slight_smile:

Sébastien

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs