Sockets connections are stateful.
A stateful connection means that the server and the client maintain information about the state of the connection, such as the current sequence number, the number of bytes sent, and the number of bytes received. This information is used to ensure that packets are received and processed in the correct order and to detect and correct any errors that occur during transmission. This makes it possible for the server and the client to maintain an ongoing conversation and to keep track of the state of the connection.

This is in contrast to stateless connections, where each packet is treated as an independent unit of data and the server does not maintain any information about previous packets. Stateless connections are typically used for simple, one-time interactions, such as sending a single request and receiving a single response.

In summary, socket connections are stateful, meaning that the server and the client maintain information about the state of the connection. This makes it possible for the server and the client to maintain an ongoing conversation and to keep track of the state of the connection.