I'm trying to send data through the internet.

Is the recv() function supposed to receive all data after the send() function has sent everything and disconnected after?
Or are the two sides supposed to stay connected until the recv() side received all bytes?