Exceptional Conditions during TCP Communications

The TCP protocol is tremendously robust in the face of poor network conditions. It can survive slow connections, flaky routers, intermittent network outages, and a variety of misconfigurations, and still manage to deliver a consistent, error-free data stream.

TCP can't overcome all problems. This section briefly discusses the common exceptions, as well as some common programming errors.

Exceptions during connect()

Various errors are common during calls to connect().

  1. The remote host is up, but no server is listening when the client tries to connect. A client tries to connect to a remote host, but no server is listening to the indicated port. The connect() function aborts with a "Connection refused" ...

Get Network Programming with Perl now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.