Represents the current state of a TCP socket connection.
Socket lifecycle transitions:
disconnected
opening
open
destroyed
Represents the current state of a TCP socket connection.
Socket lifecycle transitions:
disconnected→ Initial state after constructionopening→ During connection establishment (after connect() called)open→ Successfully connected and ready for I/Odestroyed→ Terminal state, socket cannot be reused