mirror of
https://github.com/codex-storage/nim-libp2p.git
synced 2025-01-12 20:14:09 +00:00
cosmetic
This commit is contained in:
parent
93bd7f623c
commit
b26d1ac23a
@ -106,10 +106,10 @@ proc handle*(m: MultisteamSelect, conn: Connection) {.async, gcsafe.} =
|
|||||||
await conn.write(m.na)
|
await conn.write(m.na)
|
||||||
|
|
||||||
proc addHandler*[T: LPProtocol](m: MultisteamSelect,
|
proc addHandler*[T: LPProtocol](m: MultisteamSelect,
|
||||||
proto: string,
|
codec: string,
|
||||||
protocol: T,
|
protocol: T,
|
||||||
matcher: Matcher = nil) =
|
matcher: Matcher = nil) =
|
||||||
## register a handler for the protocol
|
## register a handler for the protocol
|
||||||
m.handlers.add(HandlerHolder(proto: proto,
|
m.handlers.add(HandlerHolder(proto: codec,
|
||||||
protocol: protocol,
|
protocol: protocol,
|
||||||
match: matcher))
|
match: matcher))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user