Skip to content

net: sockets: listen() ignores backlog parameter #10200

@leodido99

Description

@leodido99

When calling listen on a socket you are supposed to provide the length of the pending connections backlog. In Zephyr this parameter is ignored when reaching net_context_listen.

Listen man entry specifies the behaviour as such:
The backlog argument defines the maximum length to which the queue of pending connections for sockfd may grow. If a connection request arrives when the queue is full, the client may receive an error with an indication of ECONNREFUSED or, if the underlying protocol supports retransmission, the request may be ignored so that a later reattempt at connection succeeds.

Currently the behaviour seems to be largely driven by the value of CONFIG_NET_MAX_CONN.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions