fix imports
This commit is contained in:
parent
8e3ef540ea
commit
eef5dd0042
|
@ -40,7 +40,7 @@ type
|
||||||
# https://github.com/libp2p/specs/tree/master/mplex#writing-to-a-stream
|
# https://github.com/libp2p/specs/tree/master/mplex#writing-to-a-stream
|
||||||
const MaxMsgSize* = 1 shl 20 # 1mb
|
const MaxMsgSize* = 1 shl 20 # 1mb
|
||||||
|
|
||||||
proc newInvalidMplexMsgType*(): ref InvalidMplexMsgType =
|
proc newInvalidMplexMsgType(): ref InvalidMplexMsgType =
|
||||||
newException(InvalidMplexMsgType, "invalid message type")
|
newException(InvalidMplexMsgType, "invalid message type")
|
||||||
|
|
||||||
proc readMsg*(conn: Connection): Future[Msg] {.async, gcsafe.} =
|
proc readMsg*(conn: Connection): Future[Msg] {.async, gcsafe.} =
|
||||||
|
|
|
@ -10,10 +10,9 @@
|
||||||
{.push raises: [Defect].}
|
{.push raises: [Defect].}
|
||||||
|
|
||||||
import std/[oids, strformat]
|
import std/[oids, strformat]
|
||||||
import chronos, chronicles, metrics
|
import pkg/[chronos, chronicles, metrics, nimcrypto/utils]
|
||||||
import ./coder,
|
import ./coder,
|
||||||
../muxer,
|
../muxer,
|
||||||
nimcrypto/utils,
|
|
||||||
../../stream/[bufferstream, connection, streamseq],
|
../../stream/[bufferstream, connection, streamseq],
|
||||||
../../peerinfo
|
../../peerinfo
|
||||||
|
|
||||||
|
|
|
@ -34,9 +34,8 @@ when defined(libp2p_expensive_metrics):
|
||||||
"mplex channels", labels = ["initiator", "peer"])
|
"mplex channels", labels = ["initiator", "peer"])
|
||||||
|
|
||||||
type
|
type
|
||||||
MplexError* = object of MuxerError
|
TooManyChannels* = object of MuxerError
|
||||||
TooManyChannels* = object of MplexError
|
InvalidChannelIdError* = object of MuxerError
|
||||||
InvalidChannelIdError* = object of MplexError
|
|
||||||
|
|
||||||
Mplex* = ref object of Muxer
|
Mplex* = ref object of Muxer
|
||||||
channels: array[bool, Table[uint64, LPChannel]]
|
channels: array[bool, Table[uint64, LPChannel]]
|
||||||
|
|
|
@ -13,9 +13,10 @@ import std/[hashes, oids, strformat]
|
||||||
import chronicles, chronos, metrics
|
import chronicles, chronos, metrics
|
||||||
import lpstream,
|
import lpstream,
|
||||||
../multiaddress,
|
../multiaddress,
|
||||||
../peerinfo
|
../peerinfo,
|
||||||
|
../errors
|
||||||
|
|
||||||
export lpstream, peerinfo
|
export lpstream, peerinfo, errors
|
||||||
|
|
||||||
logScope:
|
logScope:
|
||||||
topics = "libp2p connection"
|
topics = "libp2p connection"
|
||||||
|
|
Loading…
Reference in New Issue