Skip to content

Allow to read current connection limits #2809

Closed

Description

@dignifiedquire

Currently it is possible to get to the ConnectionLimits struct for the current swarm, but it is not possible to read the actual limits, which would be useful to for components that want to check how close to the limit the current state is.

Bonus: It might be nice if there were some methods like has_reached_outgoing_connection_limit for more explicit checks.

Activity

  1. thomaseizinger commented on Aug 11, 2022

    @thomaseizinger
    Contributor

    Perhaps we should report the limit with each new connection?

  2. mxinden commented on Aug 15, 2022

    @mxinden
    Member

    I would welcome any patches for this.

    In case anyone is looking into it, I am currently working on a proposal for generic connection management, i.e. the ability for users to implement their own connection management (e.g. limiting) mechanism. I have not yet published this work.

    See also #2118 (comment)

  3. mxinden commented on Oct 5, 2022

    @mxinden
    Member

    Tracking issue for the above mentioned effort: #2824

    First draft: #2828

  4. thomaseizinger commented on Jun 15, 2023

    @thomaseizinger
    Contributor

    Connection limits are now a completely standalone component implemented as NetworkBehaviour. It does currently not expose this functionality but that could easily be added. If really necessary, the behaviour can be forked. Thus closing this issue.

    If desired, patches to expose ConnectionLimits are welcome.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions