'Can TCP transmit multiple application layer messages concurrently withing the same TCP connection?

I’m reading the article how TCP breaks application message into smaller parts (TCP segments) and use sequence and acknowledge numbers for interacting. In the article there is a example how is transmitting one application layer message within one TCP connection. So, I have a question. Can TCP transmit multiple application layer messages concurrently withing the same TCP connection.

In other words:

  1. Creating TCP connection between client and server.
  2. Client breaks message1 from application layer into TCP segments and start sending them
  3. Client breaks message2 from application layer into TCP segments and start sending them
  4. Client breaks message3 from application layer into TCP segments and start sending them

Step 2,3,4 are going in parallel withing the same TCP connection.

  1. Server receives segments from message1, message2, message3 and send responses in parallel.

Is this possible somehow in TCP? Or we can transmit messages only consequently within the same TCP connection. I’m interested in TCP protocol itself, it doesn’t matter what tricks are used in application layer like multiplexing.

tcp


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source