Skip to content

The effect of the timeout option might surprise users #3

Open
@djeikyb

Description

The timeout is implemented by doing N attempts and waiting one second between each attempt. If the attempt isn't instantaneous, the effective timeout balloons. Some versions of netcat allow you to control the tcp connection timeout. The version of netcat that shipped with my copy of macos sierra takes 75 seconds to timeout by default:

18:00:40]~% time nc google.com 807
nc google.com 807  0.00s user 0.00s system 0% cpu 1:15.25 total
18:02:01]~% time nc google.com 807
nc google.com 807  0.00s user 0.00s system 0% cpu 1:15.08 total

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions