Passive and active sockets code example
Example: Passive and active sockets
Sockets come in two primary flavors: active and passive. An active socket is connected to a remote active socket via an open data connection. Closing the connection destroys the active sockets at each end point. A passive socket is not connected, but rather awaits an incoming connection, which will spawn a new active socket.