When two endpoints connect, they create a network stream. Network streams must have a writer endpoint that writes data to a stream and a reader endpoint that reads data from the stream.
Each endpoint is identified by a URL, which establishes a connection between two compatible endpoints. The order of creating endpoints is not important.
When the network disconnects, and an endpoint becomes inactive, the other endpoint continuously tries to reestablish communication with the inactive endpoint in the background. This background process continues until the connection is repaired or until the inactive endpoint is destroyed.