Skip to content

LPProtocol should have method handler #1913

@gmelodie

Description

@gmelodie

Original comment:

code all over the place does this assigns like this. would be better if there was handle function so that code is
kad.handler = kad.handlerImp, this makes constructor new much more concise and shorter.
then if code goes down this route, why handlers are not just some proc/method on type?

In other words, we should probably change LPProtocol to include a handler method that should be implemented by protocols

method handler*(conn: Connection, proto: string) {.base, async: (raises: [CancelledError]).} =

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    new

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions