diff --git a/message-id-mem/libp2p.html b/message-id-mem/libp2p.html index cdc8638d9..e70d7b0b0 100644 --- a/message-id-mem/libp2p.html +++ b/message-id-mem/libp2p.html @@ -260,7 +260,7 @@ class="link-seesrc" target="_blank">Source
diff --git a/message-id-mem/libp2p/builders.html b/message-id-mem/libp2p/builders.html index 2af36a2ef..b61baa563 100644 --- a/message-id-mem/libp2p/builders.html +++ b/message-id-mem/libp2p/builders.html @@ -228,7 +228,8 @@ window.addEventListener("DOMContentLoaded", main2); autonat: bool circuitRelay: Relay rdv: RendezVous - services: seq[Service]">SwitchBuilder + services: seq[Service] + observedAddrManager: ObservedAddrManager">SwitchBuilderproc newStandardSwitch(privKey = none(PrivateKey); addrs: MultiAddress | - seq[MultiAddress] = init(MultiAddress, "/ip4/127.0.0.1/tcp/0").tryGet(); - secureManagers: openArray[SecureProtocol] = [SecureProtocol.Noise]; - transportFlags: set[ServerFlags] = {}; rng = newRng(); - inTimeout: Duration = 5.minutes; + seq[MultiAddress] = init(MultiAddress, "/ip4/127.0.0.1/tcp/0").expect( + "valid address"); secureManagers: openArray[SecureProtocol] = [ + SecureProtocol.Noise]; transportFlags: set[ServerFlags] = {}; + rng = newRng(); inTimeout: Duration = 5.minutes; outTimeout: Duration = 5.minutes; maxConnections = MaxConnections; maxIn = -1; maxOut = -1; maxConnsPerPeer = MaxConnectionsPerPeer; @@ -494,9 +503,9 @@ class="link-seesrc" target="_blank">Source Helper for common switch configurations. Source - Edit + Edit
Set the listening address of the switch
Calling it multiple time will override the value
Set the listening addresses of the switch
Calling it multiple time will override the value
proc withObservedAddrManager(b: SwitchBuilder; + observedAddrManager: ObservedAddrManager): SwitchBuilder {. + ...raises: [], tags: [].}
proc close(c: ConnManager): Future[void] {.stackTrace: false, ...gcsafe, - raises: [], raises: [], raises: [], tags: [RootEffect].}
proc close(c: ConnManager): Future[void] {.stackTrace: false, ...raises: [], + gcsafe, raises: [], raises: [], tags: [RootEffect].}
proc dropPeer(c: ConnManager; peerId: PeerId): Future[void] {.stackTrace: false, - ...gcsafe, raises: [], raises: [], raises: [], tags: [RootEffect].}
proc expectConnection(c: ConnManager; p: PeerId; dir: Direction): Future[Muxer] {. - stackTrace: false, ...gcsafe, raises: [], raises: [], raises: [], + stackTrace: false, ...raises: [], gcsafe, raises: [], raises: [], tags: [RootEffect].}
proc getIncomingSlot(c: ConnManager): Future[ConnectionSlot] {. + stackTrace: false, ...raises: [], gcsafe, raises: [], raises: [], + tags: [RootEffect].}
proc getStream(c: ConnManager; muxer: Muxer): Future[Connection] {. + stackTrace: false, ...raises: [], gcsafe, raises: [], raises: [], + tags: [RootEffect].}
proc getStream(c: ConnManager; peerId: PeerId): Future[Connection] {....gcsafe, - stackTrace: false, ...gcsafe, raises: [], raises: [], raises: [], + proc getStream(c: ConnManager; peerId: PeerId): Future[Connection] {. + stackTrace: false, ...raises: [], gcsafe, raises: [], raises: [], tags: [RootEffect].}- get a muxed stream for the passed peer from any connection Source - Edit + Edit
proc getStream(c: ConnManager; peerId: PeerId; dir: Direction): Future[ - Connection] {....gcsafe, stackTrace: false, ...gcsafe, raises: [], raises: [], - raises: [], tags: [RootEffect].}
proc storeMuxer(c: ConnManager; muxer: Muxer) {....raises: [CatchableError], - raises: [], tags: [RootEffect, WriteIOEffect, TimeEffect].}
proc triggerPeerEvents(c: ConnManager; peerId: PeerId; event: PeerEvent): Future[ - void] {....gcsafe, stackTrace: false, ...gcsafe, raises: [], raises: [], - raises: [], tags: [RootEffect].}
method connect(self: Dial; address: MultiAddress; allowUnknownPeerId = false): Future[ - PeerId] {.base, stackTrace: false, ...gcsafe, raises: [], raises: [], + PeerId] {.base, stackTrace: false, ...raises: [], gcsafe, raises: [], raises: [], tags: [RootEffect].}
method connect(self: Dial; peerId: PeerId; addrs: seq[MultiAddress]; - forceDial = false; reuseConnection = true; - upgradeDir = Direction.Out): Future[void] {.base, - stackTrace: false, ...gcsafe, raises: [], raises: [], raises: [], - tags: [RootEffect].}
method dial(self: Dial; peerId: PeerId; addrs: seq[MultiAddress]; protos: seq[string]; forceDial = false): Future[Connection] {.base, - stackTrace: false, ...gcsafe, raises: [], raises: [], raises: [], + stackTrace: false, ...raises: [], gcsafe, raises: [], raises: [], tags: [RootEffect].}
method dial(self: Dial; peerId: PeerId; protos: seq[string]): Future[Connection] {. - base, stackTrace: false, ...gcsafe, raises: [], raises: [], raises: [], + base, stackTrace: false, ...raises: [], gcsafe, raises: [], raises: [], tags: [RootEffect].}
method tryDial(self: Dial; peerId: PeerId; addrs: seq[MultiAddress]): Future[ - Opt[MultiAddress]] {.base, stackTrace: false, ...gcsafe, raises: [], + Opt[MultiAddress]] {.base, stackTrace: false, ...raises: [], gcsafe, raises: [], raises: [], tags: [RootEffect].}
method connect(self: Dialer; address: MultiAddress; allowUnknownPeerId = false): Future[ - PeerId] {.stackTrace: false, ...gcsafe, raises: [], tags: [RootEffect].}
method connect(self: Dialer; peerId: PeerId; addrs: seq[MultiAddress]; - forceDial = false; reuseConnection = true; - upgradeDir = Direction.Out): Future[void] {.stackTrace: false, - ...gcsafe, raises: [], tags: [RootEffect].}
method dial(self: Dialer; peerId: PeerId; addrs: seq[MultiAddress]; protos: seq[string]; forceDial = false): Future[Connection] {. - stackTrace: false, ...gcsafe, raises: [], tags: [RootEffect].}
method dial(self: Dialer; peerId: PeerId; protos: seq[string]): Future[ - Connection] {.stackTrace: false, ...gcsafe, raises: [], tags: [RootEffect].}
method tryDial(self: Dialer; peerId: PeerId; addrs: seq[MultiAddress]): Future[ - Opt[MultiAddress]] {.stackTrace: false, ...gcsafe, raises: [], + Opt[MultiAddress]] {.stackTrace: false, ...raises: [], gcsafe, tags: [RootEffect].}
proc allFuturesThrowing[T](args: varargs[Future[T]]): Future[void]
func toException(e: cstring): ref LPError {....raises: [], tags: [].}
This procedure performs validation of concatenated result and can raise exception on error.
Source - Edit + Edit @@ -2007,9 +2007,9 @@ class="link-seesrc" target="_blank">SourceThis procedure performs validation of concatenated result and can raise exception on error.
Source - Edit + Edit @@ -2020,9 +2020,9 @@ class="link-seesrc" target="_blank">Source Check of two MultiAddress are equal Source - Edit + Edit @@ -2033,9 +2033,9 @@ class="link-seesrc" target="_blank">Source Returns partial MultiAddress with MultiCodec codec and present in MultiAddress ma. Source - Edit + Edit @@ -2046,9 +2046,9 @@ class="link-seesrc" target="_blank">Source Returns part with index i of MultiAddress ma. Source - Edit + Edit @@ -2059,9 +2059,9 @@ class="link-seesrc" target="_blank">Source Returns parts with slice slice of MultiAddress ma. Source - Edit + Edit @@ -2072,9 +2072,9 @@ class="link-seesrc" target="_blank">Source Source - Edit + Edit @@ -2084,9 +2084,9 @@ class="link-seesrc" target="_blank">Source Source - Edit + Edit @@ -2097,9 +2097,9 @@ class="link-seesrc" target="_blank">Source Source - Edit + Edit @@ -2110,9 +2110,9 @@ class="link-seesrc" target="_blank">Source Returns true, if address with MultiCodec codec present in MultiAddress ma. Source - Edit + Edit @@ -2135,9 +2135,9 @@ class="link-seesrc" target="_blank">Source Get MultiBase encoded representation of ma using encoding encoding. Source - Edit + Edit @@ -2148,9 +2148,9 @@ class="link-seesrc" target="_blank">Source Source - Edit + Edit @@ -2162,9 +2162,9 @@ class="link-seesrc" target="_blank">Source Read repeated field from protobuf message. field is field number. If the message is malformed, an error is returned. If field is not present in message, then ok(false) is returned and value is empty. If field is present, but no items could be parsed, then err(ProtoError.IncorrectBlob) is returned and value is empty. If field is present and some item could be parsed, then true is returned and value contains the parsed values. Source - Edit + Edit @@ -2186,9 +2186,9 @@ class="link-seesrc" target="_blank">Source Return hexadecimal string representation of MultiAddress value. Source - Edit + Edit @@ -2198,9 +2198,23 @@ class="link-seesrc" target="_blank">Source Initialize empty MultiAddress. Source - Edit + Edit + + + +proc init(mtype: typedesc[MultiAddress]; address: IpAddress; + protocol: IpTransportProtocol; port: Port): MultiAddress {....raises: [], + public.}
proc init(mtype: typedesc[MultiAddress]; address: ValidIpAddress; - protocol: IpTransportProtocol; port: Port): MultiAddress {....raises: [], - public.}
If current MultiAddress do not have argument value, then result array will be empty.
Source - Edit + Edit @@ -2407,9 +2407,9 @@ class="link-seesrc" target="_blank">SourceIf current MultiAddress do not have argument value, then result array will be empty.
Source - Edit + Edit @@ -2422,9 +2422,9 @@ class="link-seesrc" target="_blank">SourceIf current MultiAddress do not have argument value, then result will be 0.
Source - Edit + Edit @@ -2435,9 +2435,9 @@ class="link-seesrc" target="_blank">Source Returns MultiAddress ma protocol code. Source - Edit + Edit @@ -2448,9 +2448,9 @@ class="link-seesrc" target="_blank">Source Returns list of protocol codecs inside of MultiAddress value. Source - Edit + Edit @@ -2461,9 +2461,9 @@ class="link-seesrc" target="_blank">Source Returns MultiAddress ma protocol name. Source - Edit + Edit @@ -2474,9 +2474,9 @@ class="link-seesrc" target="_blank">Source Return string representation of MultiAddress value. Source - Edit + Edit @@ -2486,9 +2486,9 @@ class="link-seesrc" target="_blank">Source Returns true if MultiAddress ma is valid. Source - Edit + Edit @@ -2499,9 +2499,9 @@ class="link-seesrc" target="_blank">Source Source - Edit + Edit @@ -2512,9 +2512,9 @@ class="link-seesrc" target="_blank">Source Write MultiAddress value ma to buffer vb. Source - Edit + Edit @@ -2530,9 +2530,9 @@ class="link-seesrc" target="_blank">Source Iterates over all addresses inside of MultiAddress ma. Source - Edit + Edit @@ -2551,7 +2551,7 @@ class="link-seesrc" target="_blank">Source diff --git a/message-id-mem/libp2p/multibase.html b/message-id-mem/libp2p/multibase.html index 42d373d64..522d53cbb 100644 --- a/message-id-mem/libp2p/multibase.html +++ b/message-id-mem/libp2p/multibase.html @@ -396,7 +396,7 @@ class="link-seesrc" target="_blank">Source diff --git a/message-id-mem/libp2p/multicodec.html b/message-id-mem/libp2p/multicodec.html index c7c6608bb..8b8821678 100644 --- a/message-id-mem/libp2p/multicodec.html +++ b/message-id-mem/libp2p/multicodec.html @@ -297,9 +297,9 @@ class="link-seesrc" target="_blank">Source Source - Edit + Edit @@ -310,9 +310,9 @@ class="link-seesrc" target="_blank">Source Source - Edit + Edit @@ -327,9 +327,9 @@ class="link-seesrc" target="_blank">Source Source - Edit + Edit @@ -344,9 +344,9 @@ class="link-seesrc" target="_blank">Source Returns true if MultiCodecs a and b are not equal. Source - Edit + Edit @@ -356,9 +356,9 @@ class="link-seesrc" target="_blank">Source Returns string representation of MultiCodec mc. Source - Edit + Edit @@ -368,9 +368,9 @@ class="link-seesrc" target="_blank">Source Returns true if MultiCodecs a and b are equal. Source - Edit + Edit @@ -380,9 +380,9 @@ class="link-seesrc" target="_blank">Source Compares MultiCodec mc with integer code. Source - Edit + Edit @@ -392,9 +392,9 @@ class="link-seesrc" target="_blank">Source Compares MultiCodec mc with string name. Source - Edit + Edit @@ -404,9 +404,9 @@ class="link-seesrc" target="_blank">Source Return MultiCodec from integer representation code. If code is not valid multicodec code, then InvalidMultiCodec will be returned. Source - Edit + Edit @@ -417,9 +417,9 @@ class="link-seesrc" target="_blank">Source Return MultiCodec from string representation name. If name is not valid multicodec name, then InvalidMultiCodec will be returned. Source - Edit + Edit @@ -429,9 +429,9 @@ class="link-seesrc" target="_blank">Source Hash procedure for tables. Source - Edit + Edit @@ -441,9 +441,9 @@ class="link-seesrc" target="_blank">Source Generate MultiCodec from integer code at compile time. Source - Edit + Edit @@ -453,9 +453,9 @@ class="link-seesrc" target="_blank">Source Generate MultiCodec from string name at compile time. Source - Edit + Edit @@ -465,9 +465,9 @@ class="link-seesrc" target="_blank">Source Write MultiCodec to buffer vb. Source - Edit + Edit @@ -481,7 +481,7 @@ class="link-seesrc" target="_blank">Source diff --git a/message-id-mem/libp2p/multihash.html b/message-id-mem/libp2p/multihash.html index d792ce6ad..b68209693 100644 --- a/message-id-mem/libp2p/multihash.html +++ b/message-id-mem/libp2p/multihash.html @@ -689,7 +689,7 @@ class="link-seesrc" target="_blank">Source diff --git a/message-id-mem/libp2p/multistream.html b/message-id-mem/libp2p/multistream.html index 9dd55e0ec..ef0626044 100644 --- a/message-id-mem/libp2p/multistream.html +++ b/message-id-mem/libp2p/multistream.html @@ -243,17 +243,21 @@ window.addEventListener("DOMContentLoaded", main2);proc handle(_: type MultistreamSelect; conn: Connection; protos: seq[string]; - matchers = newSeq[Matcher](); active: bool = false): Future[string] {. - ...gcsafe, stackTrace: false, ...gcsafe, raises: [], raises: [], raises: [].}
proc handle(m: MultistreamSelect; conn: Connection; active: bool = false): Future[ - void] {....gcsafe, stackTrace: false, ...gcsafe, raises: [], raises: [], - raises: [], tags: [RootEffect].}
proc handle(m: MultistreamSelect; conn: Connection; active: bool = false): InternalRaisesFuture[ + void, (CancelledError,)] {.stackTrace: false, ...raises: [], gcsafe, + raises: [], raises: [], tags: [RootEffect].}
proc list(m: MultistreamSelect; conn: Connection): Future[seq[string]] {. - stackTrace: false, ...gcsafe, raises: [], raises: [], raises: [], + proc list(m: MultistreamSelect; conn: Connection): InternalRaisesFuture[ + seq[string], (CancelledError, LPStreamError, MultiStreamError)] {. + stackTrace: false, ...raises: [], gcsafe, raises: [], raises: [], tags: [RootEffect].}- list remote protos requests on connection Source - Edit + Edit
proc select(_: MultistreamSelect | type MultistreamSelect; conn: Connection; - proto: seq[string]): Future[string] {.stackTrace: false, ...gcsafe, - raises: [], raises: [], raises: [].}
proc select(_: MultistreamSelect | type MultistreamSelect; conn: Connection; - proto: string): Future[bool] {.stackTrace: false, ...gcsafe, - raises: [], raises: [], raises: [].}
proc select(m: MultistreamSelect; conn: Connection): Future[bool] {....raises: [], +- +
proc select(m: MultistreamSelect; conn: Connection): InternalRaisesFuture[bool, + (CancelledError, LPStreamError, MultiStreamError)] {.stackTrace: false, + ...raises: [], gcsafe, raises: [], raises: [], tags: [RootEffect].}- + + + Source + Edit + +
+
proc start(m: MultistreamSelect): InternalRaisesFuture[void, (CancelledError,)] {. + stackTrace: false, ...raises: [], gcsafe, raises: [], raises: [], tags: [RootEffect].}
proc start(m: MultistreamSelect): Future[void] {.stackTrace: false, ...gcsafe, - raises: [], raises: [], raises: [], tags: [RootEffect].}
proc stop(m: MultistreamSelect): Future[void] {.stackTrace: false, ...gcsafe, - raises: [], raises: [], raises: [], tags: [RootEffect].}
proc stop(m: MultistreamSelect): InternalRaisesFuture[void, void] {. + stackTrace: false, ...raises: [], gcsafe, raises: [], raises: [], + tags: [RootEffect].}
proc readMsg(conn: Connection): Future[Msg] {....gcsafe, stackTrace: false, ...gcsafe, - raises: [], raises: [], raises: [], tags: [RootEffect].}
proc readMsg(conn: Connection): InternalRaisesFuture[Msg, + (CancelledError, LPStreamError, MuxerError)] {.stackTrace: false, + ...raises: [], gcsafe, raises: [], raises: [], tags: [RootEffect].}
proc writeMsg(conn: Connection; id: uint64; msgType: MessageType; - data: seq[byte] = @[]): Future[void] {....raises: [], tags: [].}
proc writeMsg(conn: Connection; id: uint64; msgType: MessageType; data: string): Future[ - void] {....raises: [], tags: [].}
proc writeMsg(conn: Connection; id: uint64; msgType: MessageType; data: string): InternalRaisesFuture[ + void, (CancelledError, LPStreamError)] {.stackTrace: false, ...raises: [], + gcsafe, raises: [], raises: [], tags: [].}
method close(m: Mplex): InternalRaisesFuture[void, void] {.stackTrace: false, + ...raises: [], gcsafe, raises: [], raises: [], tags: [RootEffect].}
method getStreams(m: Mplex): seq[Connection] {....raises: [], tags: [].}
method newStream(m: Mplex; name: string = ""; lazy: bool = false): InternalRaisesFuture[ + Connection, (CancelledError, LPStreamError, MuxerError)] {. + stackTrace: false, ...raises: [], gcsafe, raises: [], raises: [], + tags: [RootEffect].}
Muxer = ref object of RootObj streamHandler*: StreamHandler - handler*: Future[void] + handler*: Future[void].Raising([]) connection*: Connection
MuxerHandler = proc (muxer: Muxer): Future[void] {....gcsafe, raises: [].}
MuxerHandler = proc (muxer: Muxer): Future[void] {.async: (...raises: []).}
StreamHandler = proc (conn: Connection): Future[void] {....gcsafe, raises: [].}
StreamHandler = proc (conn: Connection): Future[void] {.async: (...raises: []).}
method close(m: Muxer): Future[void] {.base, ...gcsafe, stackTrace: false, ...gcsafe, - raises: [], raises: [], raises: [], - tags: [RootEffect].}
method close(m: Muxer): InternalRaisesFuture[void, void] {.base, + stackTrace: false, ...raises: [], gcsafe, raises: [], raises: [], + tags: [RootEffect].}
method handle(m: Muxer): Future[void] {.base, ...gcsafe, stackTrace: false, ...gcsafe, - raises: [], raises: [], raises: [], - tags: [RootEffect].}
method handle(m: Muxer): InternalRaisesFuture[void, void] {.base, + stackTrace: false, ...raises: [], gcsafe, raises: [], raises: [], + tags: [RootEffect].}
method newStream(m: Muxer; name: string = ""; lazy: bool = false): Future[ - Connection] {.base, ...gcsafe, stackTrace: false, ...gcsafe, raises: [], - raises: [], raises: [], tags: [RootEffect].}
method newStream(m: Muxer; name: string = ""; lazy: bool = false): InternalRaisesFuture[ + Connection, (CancelledError, LPStreamError, MuxerError)] {.base, + stackTrace: false, ...raises: [], gcsafe, raises: [], raises: [], tags: [].}
YamuxDefaultWindowSize = 256000
proc new(T: type[Yamux]; conn: Connection; maxChannCount: int = MaxChannelCount): T:type {. ++- proc new(T: type[Yamux]; conn: Connection; maxChannCount: int = MaxChannelCount; + windowSize: int = YamuxDefaultWindowSize; + maxSendQueueSize: int = MaxSendQueueSize; + inTimeout: Duration = 5.minutes; outTimeout: Duration = 5.minutes): T:type {. ...raises: [].}- Source - Edit - -
--@@ -451,9 +472,9 @@ class="link-seesrc" target="_blank">Source Source - Edit + Edit- -
proc open(channel: YamuxChannel): Future[void] {....gcsafe, stackTrace: false, - ...gcsafe, raises: [], raises: [], raises: [], tags: [RootEffect].}- - - - Source - Edit + Edit
method close(m: Yamux): Future[void] {.stackTrace: false, ...gcsafe, raises: [], - raises: [], raises: [], - tags: [RootEffect].}
method close(m: Yamux): InternalRaisesFuture[void, void] {.stackTrace: false, + ...raises: [], gcsafe, raises: [], raises: [], tags: [RootEffect].}
method closeImpl(channel: YamuxChannel): Future[void] {....gcsafe, - stackTrace: false, ...gcsafe, raises: [], raises: [], raises: [], + method closeImpl(channel: YamuxChannel): InternalRaisesFuture[void, void] {. + stackTrace: false, ...raises: [], gcsafe, raises: [], raises: [], tags: [RootEffect].}- Source - Edit + Edit
method handle(m: Yamux): Future[void] {....gcsafe, stackTrace: false, ...gcsafe, - raises: [], raises: [], raises: [], - tags: [RootEffect].}
method handle(m: Yamux): InternalRaisesFuture[void, void] {.stackTrace: false, + ...raises: [], gcsafe, raises: [], raises: [], tags: [RootEffect].}
method newStream(m: Yamux; name: string = ""; lazy: bool = false): Future[ - Connection] {....gcsafe, stackTrace: false, ...gcsafe, raises: [], raises: [], - raises: [], tags: [RootEffect].}
method newStream(m: Yamux; name: string = ""; lazy: bool = false): InternalRaisesFuture[ + Connection, (CancelledError, LPStreamError, MuxerError)] {. + stackTrace: false, ...raises: [], gcsafe, raises: [], raises: [], + tags: [RootEffect].}
method readOnce(channel: YamuxChannel; pbytes: pointer; nbytes: int): Future[int] {. - stackTrace: false, ...gcsafe, raises: [], raises: [], raises: [], - tags: [RootEffect].}
method readOnce(channel: YamuxChannel; pbytes: pointer; nbytes: int): InternalRaisesFuture[ + int, (CancelledError, LPStreamError)] {.stackTrace: false, ...raises: [], + gcsafe, raises: [], raises: [], tags: [RootEffect].}
method write(channel: YamuxChannel; msg: seq[byte]): Future[void] {....raises: [], - tags: [RootEffect].}
method write(channel: YamuxChannel; msg: seq[byte]): InternalRaisesFuture[void, + (CancelledError, LPStreamError)] {.stackTrace: false, ...raises: [], gcsafe, + raises: [], raises: [], + tags: [RootEffect].}
proc resolveDnsAddr(self: NameResolver; ma: MultiAddress; depth: int = 0): Future[ - seq[MultiAddress]] {.stackTrace: false, ...gcsafe, raises: [], raises: [], + seq[MultiAddress]] {.stackTrace: false, ...raises: [], gcsafe, raises: [], raises: [], tags: [RootEffect].}
proc resolveMAddress(self: NameResolver; address: MultiAddress): Future[ - seq[MultiAddress]] {.stackTrace: false, ...gcsafe, raises: [], raises: [], + seq[MultiAddress]] {.stackTrace: false, ...raises: [], gcsafe, raises: [], raises: [], tags: [RootEffect].}
method resolveIp(self: NameResolver; address: string; port: Port; domain: Domain = Domain.AF_UNSPEC): Future[ - seq[TransportAddress]] {.base, stackTrace: false, ...gcsafe, raises: [], + seq[TransportAddress]] {.base, stackTrace: false, ...raises: [], gcsafe, raises: [], raises: [], tags: [RootEffect].}
method resolveTxt(self: NameResolver; address: string): Future[seq[string]] {. - base, stackTrace: false, ...gcsafe, raises: [], raises: [], raises: [], + base, stackTrace: false, ...raises: [], gcsafe, raises: [], raises: [], tags: [RootEffect].}
proc update(p: PeerInfo): Future[void] {.stackTrace: false, ...gcsafe, raises: [], + proc update(p: PeerInfo): Future[void] {.stackTrace: false, ...raises: [], gcsafe, raises: [], public, ...raises: [], public, ...tags: [RootEffect].}- @@ -474,7 +474,7 @@ class="link-seesrc" target="_blank">Source
Exports
-formatItIMPL, hash, shortLog, random, $, write, PeerId, ==, getField, <=, capLen, init, validate, init, match, <, getBytes, maxInlineKeyLength, write, withValue, safeConvert, shortLog, >=, withValue, public, shortLog, compilesOr, toBytes, match, valueOr, init, init, init, toOpt, init, hasPublicKey, >, hex, len, exceptionToAssert, cmp, extractPublicKey, DNS_OR_IP, hash, UDP_DNS, MaError, IPFS, MaPatternOp, isEmpty, WS_DNS, initVBuffer, ProtoScalar, getProtoHeader, hex, protocols, bytes, ==, getLen, HTTPS, UNIX, TranscoderIP6, encode, [], MaResult, init, ProtoField, peekVarint, getRequiredRepeatedField, mapOr, writeSeq, WebSockets_IP, &, DNS6, TLS_WS, [], IpTransportProtocol, QUIC, toOpenArray, IP4, TranscoderPort, withValue, safeConvert, getRequiredField, $, WS_IP, withValue, public, MAKind, getField, checkFieldNumber, TranscoderOnion3, getRepeatedField, matchPartial, protoArgument, match, data, WebSockets, $, isEmpty, HTTP, initVBuffer, finish, VBuffer, init, TcpOnion3, initProtoBuffer, MAProtocol, peekSeq, getPackedRepeatedField, toOpt, getProtoHeader, ProtoHeader, IP, getField, protoAddress, DNS4, readArray, getPtr, isEnough, P2PPattern, CircuitRelay, contains, isEnough, Reliable, ProtoBuffer, len, WS, exceptionToAssert, mapAnd, UDP_IP, DNSANY, DNSADDR, append, write, WSS_IP, peekArray, WSS, readSeq, getRepeatedField, TCP_IP, getField, writePacked, Unreliable, TCP_DNS, capLen, init, protoName, protoArgument, validate, mapEq, Onion3, MaPattern, TranscoderIP6Zone, $, initProtoBuffer, concat, TranscoderP2P, WSS_DNS, writeLPVarint, write, ProtoResult, WebRTCDirect, len, UDP, MaPatResult, TranscoderOnion, write, init, shortLog, items, isEmpty, writeArray, write, WebSockets_DNS, init, UTP, [], IP6, shortLog, ProtoFlags, finish, writePBVarint, valueOr, ProtoFieldKind, TCP, TranscoderDNS, getRepeatedField, ProtoError, init, init, getField, MultiAddress, &=, readVarint, compilesOr, vsizeof, getField, TranscoderIP4, init, initVBuffer, protoCode, MaInvalidAddress, initProtoBuffer, DNS, write, TranscoderUnix, high, toString, writeVarint, SupportedWireTypes, Signature, shortLog, toBytes, DigestSheme, ephemeral, decodeProposal, init, getRawBytes, sign, SupportedSchemesInt, macOpenArray, Secret, $, write, init, selectBest, init, ECDHEScheme, ephemeral, withValue, safeConvert, init, createExchange, init, withValue, public, init, getField, valueOr, init, toBytes, random, createProposal, init, getBytes, write, toOpt, init, newRng, toRawBytes, getPublicKey, init, random, init, exceptionToAssert, init, init, init, getField, iv, CryptoError, ==, verify, init, key, SupportedSchemes, RsaDefaultKeySize, toBytes, capLen, shuffle, supported, write, ==, libp2p_pki_schemes, random, getBytes, random, keyOpenArray, CryptoResult, stretchKeys, init, init, shortLog, init, PublicKey, mac, shortLog, PKScheme, init, PrivateKey, getBytes, ivOpenArray, write, compilesOr, orError, decodeExchange, $, write, goffset, getOrder, KeyPair, DNS_OR_IP, shortLog, random, UDP_DNS, $, getProtoHeader, MaError, ephemeral, MaPatternOp, ==, WS_DNS, initVBuffer, <=, decodeProposal, ==, getLen, ECDHEScheme, shortLog, init, finish, [], macOpenArray, random, init, Secret, peekVarint, random, $, validate, mapOr, init, bytes, maxInlineKeyLength, TranscoderDNS, QUIC, init, withValue, getRequiredField, mac, stretchKeys, WS_IP, write, public, MAKind, toRawBytes, write, decode, checkFieldNumber, init, getRepeatedField, matchPartial, init, data, HTTP, initVBuffer, VBuffer, finish, peekSeq, toOpt, payloadType, getProtoHeader, ProtoHeader, init, IP, protoAddress, newRng, ==, checkValid, getPublicKey, CircuitRelay, len, exceptionToAssert, extractPublicKey, mapAnd, UDP_IP, init, ==, DNSADDR, write, WSS, TCP_IP, writePacked, toBytes, TCP_DNS, encode, len, capLen, supported, protoName, write, TranscoderIP6Zone, $, initProtoBuffer, init, ProtoBuffer, WSS_DNS, match, writeLPVarint, CryptoResult, ProtoResult, WebRTCDirect, init, $, UDP, TranscoderOnion, write, init, readVarint, isEmpty, writeArray, PeerId, [], IP6, shortLog, initVBuffer, ProtoFlags, PKScheme, init, payload, init, init, write, DNSANY, valueOr, TCP, PrivateKey, getBytes, write, &=, random, compilesOr, TranscoderIP4, init, $, initProtoBuffer, DNS, init, goffset, getRawBytes, >, KeyPair, init, high, toString, cmp, SupportedWireTypes, formatItIMPL, verify, Signature, contains, toBytes, DigestSheme, IPFS, getField, init, libp2p_pki_schemes, isEmpty, ProtoScalar, hex, protocols, init, HTTPS, UNIX, WebSockets, getPtr, getBytes, TLS_WS, TranscoderIP6, readSeq, encode, MaResult, init, ProtoField, toBytes, writeSeq, ephemeral, &, DNS6, [], IpTransportProtocol, toOpenArray, init, IP4, TranscoderPort, isEnough, safeConvert, getField, init, createExchange, >=, init, payloadDomain, MaPattern, withValue, init, TranscoderOnion3, SignedPayload, key, toBytes, protoArgument, write, keyOpenArray, match, createProposal, WebSockets_DNS, $, isEmpty, getRequiredRepeatedField, init, initProtoBuffer, MAProtocol, decode, getPackedRepeatedField, getField, DNS4, readArray, selectBest, getBytes, P2PPattern, Envelope, hasPublicKey, init, isEnough, Reliable, hex, write, WS, init, encode, init, init, init, getField, match, getField, <, iv, CryptoError, getField, append, decode, WSS_IP, peekArray, PeerRecord, init, SupportedSchemes, getRepeatedField, getField, RsaDefaultKeySize, hash, Unreliable, SupportedSchemesInt, random, init, shuffle, init, validate, mapEq, getField, Onion3, TcpOnion3, concat, TranscoderP2P, AddressInfo, sign, write, EnvelopeError, encode, len, MaPatResult, init, shortLog, init, write, getBytes, write, init, UTP, PublicKey, WebSockets_IP, writePBVarint, ProtoFieldKind, protoArgument, getRepeatedField, ProtoError, getField, MultiAddress, ivOpenArray, orError, vsizeof, decodeExchange, getField, protoCode, MaInvalidAddress, writeVarint, items, write, getOrder, hash, TranscoderUnix, SignedPeerRecord, toException, toException, allFuturesThrowing, tryAndWarn, checkFutures, LPError +formatItIMPL, hash, shortLog, random, $, write, PeerId, ==, getField, <=, capLen, init, validate, init, match, <, getBytes, maxInlineKeyLength, write, withValue, safeConvert, shortLog, >=, withValue, public, shortLog, compilesOr, toBytes, match, valueOr, init, init, init, toOpt, init, hasPublicKey, >, hex, len, exceptionToAssert, cmp, extractPublicKey, DNS_OR_IP, hash, UDP_DNS, MaError, IPFS, MaPatternOp, isEmpty, WS_DNS, initVBuffer, ProtoScalar, getProtoHeader, hex, protocols, bytes, ==, getLen, HTTPS, UNIX, TranscoderIP6, encode, [], MaResult, init, ProtoField, peekVarint, getRequiredRepeatedField, mapOr, writeSeq, WebSockets_IP, &, DNS6, TLS_WS, [], IpTransportProtocol, QUIC, toOpenArray, IP4, TranscoderPort, withValue, safeConvert, getRequiredField, $, WS_IP, withValue, public, MAKind, getField, checkFieldNumber, TranscoderOnion3, getRepeatedField, matchPartial, protoArgument, match, data, WebSockets, $, isEmpty, HTTP, initVBuffer, finish, VBuffer, init, TcpOnion3, initProtoBuffer, MAProtocol, peekSeq, getPackedRepeatedField, toOpt, getProtoHeader, ProtoHeader, IP, getField, protoAddress, DNS4, readArray, getPtr, isEnough, P2PPattern, CircuitRelay, contains, isEnough, Reliable, ProtoBuffer, len, WS, exceptionToAssert, mapAnd, UDP_IP, DNSANY, DNSADDR, append, write, WSS_IP, peekArray, WSS, readSeq, getRepeatedField, TCP_IP, getField, writePacked, Unreliable, TCP_DNS, capLen, init, protoName, protoArgument, validate, mapEq, Onion3, MaPattern, TranscoderIP6Zone, $, initProtoBuffer, concat, TranscoderP2P, WSS_DNS, writeLPVarint, write, ProtoResult, WebRTCDirect, len, UDP, MaPatResult, TranscoderOnion, write, init, shortLog, items, isEmpty, writeArray, write, WebSockets_DNS, init, UTP, [], IP6, shortLog, ProtoFlags, finish, writePBVarint, valueOr, ProtoFieldKind, TCP, TranscoderDNS, getRepeatedField, ProtoError, init, init, getField, MultiAddress, &=, readVarint, compilesOr, vsizeof, getField, TranscoderIP4, init, initVBuffer, protoCode, MaInvalidAddress, initProtoBuffer, DNS, write, TranscoderUnix, high, toString, writeVarint, SupportedWireTypes, Signature, shortLog, toBytes, DigestSheme, ephemeral, decodeProposal, init, getRawBytes, sign, SupportedSchemesInt, macOpenArray, Secret, $, write, init, selectBest, init, ECDHEScheme, ephemeral, withValue, safeConvert, init, createExchange, init, withValue, public, init, getField, valueOr, init, toBytes, random, createProposal, init, getBytes, write, toOpt, init, newRng, toRawBytes, getPublicKey, init, random, init, exceptionToAssert, init, init, init, getField, iv, CryptoError, ==, verify, init, key, SupportedSchemes, RsaDefaultKeySize, toBytes, capLen, shuffle, supported, write, ==, libp2p_pki_schemes, random, getBytes, random, keyOpenArray, CryptoResult, stretchKeys, init, init, shortLog, init, PublicKey, mac, shortLog, PKScheme, init, PrivateKey, getBytes, ivOpenArray, write, compilesOr, orError, decodeExchange, $, write, goffset, getOrder, KeyPair, DNS_OR_IP, shortLog, random, UDP_DNS, $, getProtoHeader, MaError, ephemeral, MaPatternOp, ==, WS_DNS, initVBuffer, <=, decodeProposal, ==, getLen, ECDHEScheme, shortLog, init, finish, [], macOpenArray, random, init, Secret, peekVarint, random, $, validate, mapOr, init, bytes, maxInlineKeyLength, TranscoderDNS, QUIC, init, withValue, getRequiredField, mac, stretchKeys, WS_IP, write, public, MAKind, toRawBytes, write, decode, checkFieldNumber, init, getRepeatedField, matchPartial, init, data, HTTP, initVBuffer, VBuffer, finish, peekSeq, toOpt, payloadType, getProtoHeader, ProtoHeader, init, IP, protoAddress, newRng, ==, checkValid, getPublicKey, CircuitRelay, len, exceptionToAssert, extractPublicKey, mapAnd, UDP_IP, init, ==, DNSADDR, write, WSS, TCP_IP, writePacked, toBytes, TCP_DNS, encode, len, capLen, supported, protoName, write, TranscoderIP6Zone, $, initProtoBuffer, init, ProtoBuffer, WSS_DNS, match, writeLPVarint, CryptoResult, ProtoResult, WebRTCDirect, init, $, UDP, TranscoderOnion, write, init, readVarint, isEmpty, writeArray, PeerId, [], IP6, shortLog, initVBuffer, ProtoFlags, PKScheme, init, payload, init, init, write, DNSANY, valueOr, TCP, PrivateKey, getBytes, write, &=, random, compilesOr, TranscoderIP4, init, $, initProtoBuffer, DNS, init, goffset, getRawBytes, >, KeyPair, init, high, toString, cmp, SupportedWireTypes, formatItIMPL, verify, Signature, contains, toBytes, DigestSheme, IPFS, getField, init, libp2p_pki_schemes, isEmpty, ProtoScalar, hex, protocols, init, HTTPS, UNIX, WebSockets, getPtr, getBytes, TLS_WS, TranscoderIP6, readSeq, encode, MaResult, init, ProtoField, toBytes, writeSeq, ephemeral, &, DNS6, [], IpTransportProtocol, toOpenArray, init, IP4, TranscoderPort, isEnough, safeConvert, getField, init, createExchange, >=, init, payloadDomain, MaPattern, withValue, init, TranscoderOnion3, SignedPayload, key, toBytes, protoArgument, write, keyOpenArray, match, createProposal, WebSockets_DNS, $, isEmpty, getRequiredRepeatedField, init, initProtoBuffer, MAProtocol, decode, getPackedRepeatedField, getField, DNS4, readArray, selectBest, getBytes, P2PPattern, Envelope, hasPublicKey, init, isEnough, Reliable, hex, write, WS, init, encode, init, init, init, getField, match, getField, <, iv, CryptoError, getField, append, decode, WSS_IP, peekArray, PeerRecord, init, SupportedSchemes, getRepeatedField, getField, RsaDefaultKeySize, hash, Unreliable, SupportedSchemesInt, random, init, shuffle, init, validate, mapEq, getField, Onion3, TcpOnion3, concat, TranscoderP2P, AddressInfo, sign, write, EnvelopeError, encode, len, MaPatResult, init, shortLog, init, write, getBytes, write, init, UTP, PublicKey, WebSockets_IP, writePBVarint, ProtoFieldKind, protoArgument, getRepeatedField, ProtoError, getField, MultiAddress, ivOpenArray, orError, vsizeof, decodeExchange, getField, protoCode, MaInvalidAddress, writeVarint, items, write, getOrder, hash, TranscoderUnix, SignedPeerRecord, toException, toException, tryAndWarn, checkFutures, LPError
proc dialPeerV1(cl: RelayClient; conn: Connection; dstPeerId: PeerId; dstAddrs: seq[MultiAddress]): Future[Connection] {. - stackTrace: false, ...gcsafe, raises: [], raises: [], raises: [], + stackTrace: false, ...raises: [], gcsafe, raises: [], raises: [], tags: [RootEffect].}
proc dialPeerV2(cl: RelayClient; conn: RelayConnection; dstPeerId: PeerId; dstAddrs: seq[MultiAddress]): Future[Connection] {. - stackTrace: false, ...gcsafe, raises: [], raises: [], raises: [], + stackTrace: false, ...raises: [], gcsafe, raises: [], raises: [], tags: [RootEffect].}
proc reserve(cl: RelayClient; peerId: PeerId; addrs: seq[MultiAddress] = @[]): Future[ - Rsvp] {.stackTrace: false, ...gcsafe, raises: [], raises: [], raises: [], + Rsvp] {.stackTrace: false, ...raises: [], gcsafe, raises: [], raises: [], tags: [RootEffect].}
method closeImpl(self: RelayConnection): Future[void] {.stackTrace: false, - ...gcsafe, raises: [], raises: [], raises: [], tags: [RootEffect].}
method getWrapped(self: RelayConnection): Connection {....raises: [], tags: [].}
method closeImpl(self: RelayConnection): InternalRaisesFuture[void, void] {. + stackTrace: false, ...raises: [], gcsafe, raises: [], raises: [], + tags: [RootEffect].}
method readOnce(self: RelayConnection; pbytes: pointer; nbytes: int): Future[int] {. - stackTrace: false, ...gcsafe, raises: [], raises: [], raises: [], - tags: [RootEffect].}
method getWrapped(self: RelayConnection): Connection {....raises: [], tags: [].}
method readOnce(self: RelayConnection; pbytes: pointer; nbytes: int): InternalRaisesFuture[ + int, (CancelledError, LPStreamError)] {.stackTrace: false, ...raises: [], + gcsafe, raises: [], raises: [], tags: [].}
method write(self: RelayConnection; msg: seq[byte]): Future[void] {. - stackTrace: false, ...gcsafe, raises: [], raises: [], raises: [], - tags: [RootEffect].}
method write(self: RelayConnection; msg: seq[byte]): InternalRaisesFuture[void, + (CancelledError, LPStreamError)] {.stackTrace: false, ...raises: [], gcsafe, + raises: [], raises: [], + tags: [RootEffect].}
proc handleHop(r: Relay; connSrc: Connection; msg: RelayMessage): Future[void] {. - ...gcsafe, stackTrace: false, ...gcsafe, raises: [], raises: [], raises: [], + stackTrace: false, ...raises: [], gcsafe, raises: [], raises: [], tags: [RootEffect].}
proc handleHopStreamV2(r: Relay; conn: Connection): Future[void] {....gcsafe, - stackTrace: false, ...gcsafe, raises: [], raises: [], raises: [], + proc handleHopStreamV2(r: Relay; conn: Connection): Future[void] {. + stackTrace: false, ...raises: [], gcsafe, raises: [], raises: [], tags: [RootEffect].}- @@ -531,29 +531,30 @@ class="link-seesrc" target="_blank">Source
Methods
-- +
method start(r: Relay): Future[void] {.stackTrace: false, ...gcsafe, raises: [], - raises: [], raises: [], - tags: [RootEffect].} method start(r: Relay): InternalRaisesFuture[void, (CancelledError,)] {. + stackTrace: false, ...raises: [], gcsafe, raises: [], raises: [], + tags: [WriteIOEffect, TimeEffect, RootEffect].}- Source - Edit + Edit
-@@ -567,7 +568,7 @@ class="link-seesrc" target="_blank">Source- +
method stop(r: Relay): Future[void] {.stackTrace: false, ...gcsafe, raises: [], - raises: [], raises: [], tags: [RootEffect].} method stop(r: Relay): InternalRaisesFuture[void, void] {.stackTrace: false, + ...raises: [], gcsafe, raises: [], raises: [], + tags: [WriteIOEffect, TimeEffect, RootEffect].}- Source - Edit + Edit
proc dial(self: RelayTransport; ma: MultiAddress): Future[Connection] {....gcsafe, - stackTrace: false, ...gcsafe, raises: [], raises: [], raises: [], + proc dial(self: RelayTransport; ma: MultiAddress): Future[Connection] {. + stackTrace: false, ...raises: [], gcsafe, raises: [], raises: [], tags: [RootEffect].}- @@ -337,9 +337,8 @@ class="link-seesrc" target="_blank">Source
Methods
-diff --git a/message-id-mem/libp2p/protocols/connectivity/relay/utils.html b/message-id-mem/libp2p/protocols/connectivity/relay/utils.html index 308df6269..c0fab8683 100644 --- a/message-id-mem/libp2p/protocols/connectivity/relay/utils.html +++ b/message-id-mem/libp2p/protocols/connectivity/relay/utils.html @@ -219,22 +219,30 @@ window.addEventListener("DOMContentLoaded", main2);- +
method accept(self: RelayTransport): Future[Connection] {....gcsafe, - stackTrace: false, ...gcsafe, raises: [], raises: [], raises: [], - tags: [RootEffect].} method accept(self: RelayTransport): Future[Connection] {.stackTrace: false, + ...raises: [], gcsafe, raises: [], raises: [], tags: [RootEffect].}- @@ -353,7 +352,7 @@ class="link-seesrc" target="_blank">Source
method dial(self: RelayTransport; hostname: string; ma: MultiAddress; peerId: Opt[PeerId] = Opt.none(PeerId)): Future[Connection] {. - ...gcsafe, stackTrace: false, ...gcsafe, raises: [], raises: [], raises: [], + stackTrace: false, ...raises: [], gcsafe, raises: [], raises: [], tags: [RootEffect].}- @@ -380,7 +379,7 @@ class="link-seesrc" target="_blank">Source
method start(self: RelayTransport; ma: seq[MultiAddress]): Future[void] {. - stackTrace: false, ...gcsafe, raises: [], raises: [], raises: [], + stackTrace: false, ...raises: [], gcsafe, raises: [], raises: [], tags: [RootEffect].}- @@ -393,8 +392,8 @@ class="link-seesrc" target="_blank">Source
-- +
method stop(self: RelayTransport): Future[void] {....gcsafe, stackTrace: false, - ...gcsafe, raises: [], raises: [], raises: [], tags: [RootEffect].} method stop(self: RelayTransport): Future[void] {.stackTrace: false, ...raises: [], + gcsafe, raises: [], raises: [], tags: [RootEffect].}- @@ -415,7 +414,7 @@ class="link-seesrc" target="_blank">Source
bridge
- bridge(connSrc: Connection; connDst: Connection): Future[void]
+ title="bridge(connSrc: Connection; connDst: Connection): InternalRaisesFuture[void, + (CancelledError,)]">bridge(connSrc: Connection; connDst: Connection): InternalRaisesFuture[void, + (CancelledError,)]sendHopStatus
- sendHopStatus(conn: Connection; code: StatusV2): Future[void]
+ title="sendHopStatus(conn: Connection; code: StatusV2): InternalRaisesFuture[void, + (CancelledError, LPStreamError)]">sendHopStatus(conn: Connection; code: StatusV2): InternalRaisesFuture[void, + (CancelledError, LPStreamError)]sendStatus
- sendStatus(conn: Connection; code: StatusV1): Future[void]
+ title="sendStatus(conn: Connection; code: StatusV1): InternalRaisesFuture[void, + (CancelledError, LPStreamError)]">sendStatus(conn: Connection; code: StatusV1): InternalRaisesFuture[void, + (CancelledError, LPStreamError)]sendStopStatus
@@ -303,51 +311,23 @@ class="link-seesrc" target="_blank">Source- sendStopStatus(conn: Connection; code: StatusV2): Future[void]
+ title="sendStopStatus(conn: Connection; code: StatusV2): InternalRaisesFuture[void, + (CancelledError, LPStreamError)]">sendStopStatus(conn: Connection; code: StatusV2): InternalRaisesFuture[void, + (CancelledError, LPStreamError)]Procs
-- +
proc bridge(connSrc: Connection; connDst: Connection): Future[void] {. - stackTrace: false, ...gcsafe, raises: [], raises: [], raises: [], - tags: [RootEffect].} proc bridge(connSrc: Connection; connDst: Connection): InternalRaisesFuture[ + void, (CancelledError,)] {.stackTrace: false, ...raises: [], gcsafe, + raises: [], raises: [], tags: [RootEffect].}- Source - Edit + Edit
--- -
proc sendHopStatus(conn: Connection; code: StatusV2): Future[void] {....gcsafe, - stackTrace: false, ...gcsafe, raises: [], raises: [], raises: [], - tags: [RootEffect].}- - - - Source - Edit - -
---- -
proc sendStatus(conn: Connection; code: StatusV1): Future[void] {....gcsafe, - stackTrace: false, ...gcsafe, raises: [], raises: [], raises: [], - tags: [RootEffect].}- - - - Source - Edit - -
--+- +
proc sendStopStatus(conn: Connection; code: StatusV2): Future[void] {. - stackTrace: false, ...gcsafe, raises: [], raises: [], raises: [], - tags: [RootEffect].} proc sendHopStatus(conn: Connection; code: StatusV2): InternalRaisesFuture[void, + (CancelledError, LPStreamError)] {.stackTrace: false, ...raises: [], gcsafe, + raises: [], raises: [], tags: [].}- @@ -356,6 +336,34 @@ href="https://github.com/status-im/nim-libp2p/tree/message-id-mem/libp2p/protoco class="link-seesrc" target="_blank">Source Edit +
+++- +
proc sendStatus(conn: Connection; code: StatusV1): InternalRaisesFuture[void, + (CancelledError, LPStreamError)] {.stackTrace: false, ...raises: [], gcsafe, + raises: [], raises: [], tags: [].}- + + + Source + Edit + +
++@@ -368,7 +376,7 @@ class="link-seesrc" target="_blank">Source- +
proc sendStopStatus(conn: Connection; code: StatusV2): InternalRaisesFuture[ + void, (CancelledError, LPStreamError)] {.stackTrace: false, ...raises: [], + gcsafe, raises: [], raises: [], tags: [].}- + + + Source + Edit +
IdentifyPushCodec = "/ipfs/id/push/1.0.0"
ProtoVersion = "ipfs/0.1.0"
IdentifyPushCodec = "/ipfs/id/push/1.0.0"
ProtoVersion = "ipfs/0.1.0"
proc identify(self: Identify; conn: Connection; remotePeerId: PeerId): Future[ - IdentifyInfo] {....gcsafe, stackTrace: false, ...gcsafe, raises: [], raises: [], + IdentifyInfo] {.stackTrace: false, ...raises: [], gcsafe, raises: [], raises: [], tags: [RootEffect].}
proc new(T: typedesc[Identify]; peerInfo: PeerInfo; sendSignedPeerRecord = false): T:type {. - ...raises: [].}
proc new(T: typedesc[Identify]; peerInfo: PeerInfo; + sendSignedPeerRecord = false; + observedAddrManager = ObservedAddrManager.new()): T:type {....raises: [].}
proc push(p: IdentifyPush; peerInfo: PeerInfo; conn: Connection): Future[void] {. - public(), stackTrace: false, ...gcsafe, raises: [], raises: [], raises: [], + public(), stackTrace: false, ...raises: [], gcsafe, raises: [], raises: [], tags: [RootEffect].}
proc ping(p: Ping; conn: Connection): Future[Duration] {....gcsafe, public(), - stackTrace: false, ...gcsafe, raises: [], raises: [], raises: [], + proc ping(p: Ping; conn: Connection): Future[Duration] {.public(), + stackTrace: false, ...raises: [], gcsafe, raises: [], raises: [], tags: [RootEffect].}- @@ -404,7 +404,7 @@ class="link-seesrc" target="_blank">Source
Exports
-newLPStreamWriteError, DNS_OR_IP, ProtoHeader, shortLog, init, random, UDP_DNS, $, <=, MaError, ephemeral, decode, MaPatternOp, ==, WS_DNS, initVBuffer, getProtoHeader, MaxSizeError, ProtoFlags, getLen, ECDHEScheme, shortLog, init, init, closed, [], macOpenArray, random, init, VBuffer, Secret, peekVarint, random, $, validate, mapOr, bytes, maxInlineKeyLength, TranscoderDNS, QUIC, [], key, ephemeral, withValue, getRequiredField, getField, writeLp, WS_IP, isEnough, public, MAKind, getBytes, write, DNSANY, checkFieldNumber, valueOr, getRepeatedField, matchPartial, libp2p_pki_schemes, getBytes, len, readVarint, readLp, HTTP, initVBuffer, mac, atEof, LPStreamTrackerName, peekSeq, toOpt, fullAddrs, payloadType, getProtoHeader, LPStreamError, IP, protoAddress, newRng, DefaultConnectionTimeout, ==, checkValid, getPublicKey, exceptionToAssert, decodeProposal, len, CircuitRelay, extractPublicKey, mapAnd, new, verify, UDP_IP, new, newLPStreamEOFError, init, write, ==, DNSADDR, AddressMapper, write, PeerId, WSS, LPStream, TCP_IP, close, hash, writePacked, init, closeImpl, readSeq, toBytes, TCP_DNS, shortLog, encode, len, capLen, protoName, toRawBytes, TranscoderIP6Zone, $, initProtoBuffer, newLPStreamReadError, init, WSS_DNS, match, writeLPVarint, CryptoResult, WebSockets_DNS, ProtoResult, WebRTCDirect, init, init, UDP, TranscoderOnion, StreamTracker, write, init, LPStreamResetError, isEmpty, writeArray, LPStreamReadError, decode, LPStreamIncompleteError, [], LPStreamEOFError, IP6, shortLog, initVBuffer, decode, PKScheme, payload, init, init, Connection, write, init, TCP, PrivateKey, getBytes, write, &=, PeerInfoError, newLPStreamClosedError, random, compilesOr, TranscoderIP4, init, initProtoBuffer, toException, DNS, UTP, goffset, readVarint, >, KeyPair, init, init, high, toString, cmp, init, SupportedWireTypes, formatItIMPL, formatItIMPL, formatItIMPL, Signature, contains, hash, formatItIMPL, toBytes, DigestSheme, init, IPFS, readOnce, init, isEmpty, ProtoScalar, shortLog, data, LPStreamIncorrectDefect, hex, protocols, update, HTTPS, tryAndWarn, WebSockets, LPError, getPtr, write, TLS_WS, sign, finish, encode, MaResult, ProtoField, init, toBytes, writeSeq, init, &, DNS6, IpTransportProtocol, toOpenArray, init, allFuturesThrowing, IP4, TranscoderPort, write, newLPStreamIncorrectDefect, getField, init, createExchange, >=, init, payloadDomain, $, MaPattern, withValue, getRawBytes, init, LPStreamLimitError, TranscoderOnion3, SignedPayload, toBytes, protoArgument, newLPStreamLimitError, keyOpenArray, match, createProposal, parseFullAddress, $, isEmpty, supported, getRequiredRepeatedField, init, newLPStreamIncompleteError, newLPStreamReadError, initProtoBuffer, MAProtocol, newLPStreamResetError, getPackedRepeatedField, initStream, init, getField, shortLog, DNS4, getWrapped, readArray, selectBest, safeConvert, P2PPattern, Envelope, hasPublicKey, toException, init, isEnough, init, Reliable, addrs, hex, ProtoBuffer, closeImpl, write, WS, stretchKeys, encode, init, init, getField, getField, match, getField, <, iv, readLine, Eof, CryptoError, getField, hash, append, vsizeof, init, parseFullAddress, WSS_IP, LPStreamConnDownError, peekArray, UNIX, PeerRecord, init, SupportedSchemes, getRepeatedField, LPStreamWriteError, getField, Unreliable, SupportedSchemesInt, random, checkFutures, shuffle, init, validate, $, protoCode, mapEq, Onion3, write, TcpOnion3, concat, TranscoderP2P, PeerInfo, AddressInfo, ConnectionTrackerName, TranscoderIP6, write, EnvelopeError, encode, newLPStreamRemoteClosedError, MaPatResult, Direction, InvalidVarintError, shortLog, items, ==, init, write, getBytes, write, init, PublicKey, WebSockets_IP, writeLp, writePBVarint, ProtoFieldKind, readExactly, protoArgument, getRepeatedField, ProtoError, newLPStreamConnDownError, write, initStream, getField, MultiAddress, finish, ivOpenArray, closeWithEOF, TimeoutHandler, orError, decodeExchange, getField, LPStreamRemoteClosedError, setupStreamTracker, MaInvalidAddress, LPStreamClosedError, RsaDefaultKeySize, write, getOrder, TranscoderUnix, SignedPeerRecord, join, writeVarint +DNS_OR_IP, ProtoHeader, shortLog, init, random, UDP_DNS, $, getProtoHeader, MaError, ephemeral, MaPatternOp, ==, WS_DNS, initVBuffer, getProtoHeader, MaxSizeError, ProtoFlags, getLen, ECDHEScheme, shortLog, init, init, closed, [], macOpenArray, random, init, VBuffer, Secret, peekVarint, random, $, validate, init, bytes, maxInlineKeyLength, TranscoderDNS, QUIC, [], init, ephemeral, withValue, getRequiredField, getField, supported, WS_IP, write, public, MAKind, write, checkFieldNumber, valueOr, getRepeatedField, matchPartial, libp2p_pki_schemes, getBytes, len, readVarint, readLp, HTTP, initVBuffer, atEof, LPStreamTrackerName, write, toOpt, fullAddrs, payloadType, <=, LPStreamError, IP, protoAddress, newRng, DefaultConnectionTimeout, ==, checkValid, mac, getPublicKey, exceptionToAssert, decodeProposal, len, CircuitRelay, extractPublicKey, mapAnd, new, verify, UDP_IP, new, newLPStreamEOFError, ==, DNSADDR, AddressMapper, init, write, PeerId, WSS, LPStream, TCP_IP, close, hash, writePacked, init, init, closeImpl, readSeq, toBytes, TCP_DNS, shortLog, encode, len, capLen, init, protoName, toRawBytes, mapOr, TranscoderIP6Zone, $, initProtoBuffer, WSS_DNS, match, writeLPVarint, CryptoResult, parseFullAddress, ProtoResult, WebRTCDirect, init, init, UDP, TranscoderOnion, StreamTracker, write, init, LPStreamResetError, isEmpty, writeArray, decode, LPStreamIncompleteError, [], LPStreamEOFError, IP6, shortLog, initVBuffer, decode, PKScheme, payload, init, stretchKeys, Connection, write, DNSANY, TCP, PrivateKey, getBytes, write, init, &=, PeerInfoError, newLPStreamClosedError, random, write, compilesOr, TranscoderIP4, initProtoBuffer, toException, DNS, UTP, goffset, getRawBytes, >, KeyPair, init, init, high, toString, cmp, init, SupportedWireTypes, formatItIMPL, formatItIMPL, formatItIMPL, Signature, contains, formatItIMPL, toBytes, DigestSheme, IPFS, getField, readOnce, init, isEmpty, ProtoScalar, shortLog, data, hex, protocols, HTTPS, tryAndWarn, WebSockets, LPError, getPtr, write, TLS_WS, sign, init, encode, update, MaResult, init, ProtoField, init, toBytes, writeSeq, &, DNS6, IpTransportProtocol, toOpenArray, init, IP4, TranscoderPort, isEnough, safeConvert, getField, init, createExchange, >=, readVarint, payloadDomain, $, MaPattern, withValue, init, LPStreamLimitError, TranscoderOnion3, SignedPayload, toBytes, protoArgument, newLPStreamLimitError, write, keyOpenArray, match, createProposal, parseFullAddress, $, isEmpty, writeLp, getRequiredRepeatedField, init, newLPStreamIncompleteError, initProtoBuffer, MAProtocol, newLPStreamResetError, getPackedRepeatedField, initStream, init, getField, shortLog, DNS4, getWrapped, readArray, selectBest, write, P2PPattern, Envelope, hasPublicKey, toException, isEnough, init, Reliable, addrs, hex, ProtoBuffer, closeImpl, getBytes, WS, init, init, encode, init, finish, getField, match, getField, <, iv, readLine, Eof, CryptoError, getField, hash, append, hash, vsizeof, WebSockets_DNS, WSS_IP, LPStreamConnDownError, peekArray, UNIX, PeerRecord, init, SupportedSchemes, getRepeatedField, getField, Unreliable, SupportedSchemesInt, random, checkFutures, shuffle, key, validate, $, protoCode, mapEq, Onion3, write, TcpOnion3, concat, TranscoderP2P, PeerInfo, AddressInfo, ConnectionTrackerName, TranscoderIP6, finish, write, EnvelopeError, encode, newLPStreamRemoteClosedError, MaPatResult, Direction, init, InvalidVarintError, decode, shortLog, items, ==, init, peekSeq, getBytes, write, init, init, PublicKey, WebSockets_IP, writeLp, writePBVarint, ProtoFieldKind, readExactly, protoArgument, getRepeatedField, ProtoError, newLPStreamConnDownError, initStream, getField, MultiAddress, ivOpenArray, closeWithEOF, TimeoutHandler, orError, decodeExchange, getField, LPStreamRemoteClosedError, MaInvalidAddress, LPStreamClosedError, RsaDefaultKeySize, write, getOrder, TranscoderUnix, SignedPeerRecord, join, writeVarint
method start(p: LPProtocol): Future[void] {.base, stackTrace: false, ...gcsafe, - raises: [], raises: [], raises: [], tags: [RootEffect].}
method start(p: LPProtocol): InternalRaisesFuture[void, (CancelledError,)] {. + base, stackTrace: false, ...raises: [], gcsafe, raises: [], raises: [], + tags: [].}
method stop(p: LPProtocol): Future[void] {.base, stackTrace: false, ...gcsafe, - raises: [], raises: [], raises: [], tags: [RootEffect].}
method stop(p: LPProtocol): InternalRaisesFuture[void, void] {.base, + stackTrace: false, ...raises: [], gcsafe, raises: [], raises: [], tags: [].}
method publish(f: FloodSub; topic: string; data: seq[byte]): Future[int] {. - stackTrace: false, ...gcsafe, raises: [], raises: [], raises: [], + stackTrace: false, ...raises: [], gcsafe, raises: [], raises: [], tags: [RootEffect].}
method rpcHandler(f: FloodSub; peer: PubSubPeer; data: seq[byte]): Future[void] {. - stackTrace: false, ...gcsafe, raises: [], raises: [], raises: [], + stackTrace: false, ...raises: [], gcsafe, raises: [], raises: [], tags: [RootEffect].}
proc addDirectPeer(g: GossipSub; id: PeerId; addrs: seq[MultiAddress]): Future[ - void] {.stackTrace: false, ...gcsafe, raises: [], raises: [], raises: [], + void] {.stackTrace: false, ...raises: [], gcsafe, raises: [], raises: [], tags: [RootEffect].}
proc rateLimit(g: GossipSub; peer: PubSubPeer; rpcMsgOpt: Opt[RPCMsg]; - msgSize: int): Future[void] {. - ...raises: [PeerRateLimitError, CatchableError], stackTrace: false, ...gcsafe, - raises: [], raises: [], raises: [], tags: [RootEffect].}
method getOrCreatePeer(g: GossipSub; peerId: PeerId; protos: seq[string]): PubSubPeer {. - ...raises: [], tags: [RootEffect, WriteIOEffect, TimeEffect].}
method onPubSubPeerEvent(p: GossipSub; peer: PubSubPeer; event: PubSubPeerEvent) {. - ...gcsafe, raises: [], tags: [RootEffect].}
method onTopicSubscription(g: GossipSub; topic: string; subscribed: bool) {. - ...raises: [], tags: [RootEffect].}
method publish(g: GossipSub; topic: string; data: seq[byte]): Future[int] {. - stackTrace: false, ...gcsafe, raises: [], raises: [], raises: [], + stackTrace: false, ...raises: [], gcsafe, raises: [], raises: [], tags: [RootEffect].}
method rpcHandler(g: GossipSub; peer: PubSubPeer; data: seq[byte]): Future[void] {. - stackTrace: false, ...gcsafe, raises: [], raises: [], raises: [], + stackTrace: false, ...raises: [], gcsafe, raises: [], raises: [], tags: [RootEffect].}
method start(g: GossipSub): Future[void] {.stackTrace: false, ...gcsafe, - raises: [], raises: [], raises: [], tags: [RootEffect].}
method start(g: GossipSub): InternalRaisesFuture[void, (CancelledError,)] {. + stackTrace: false, ...raises: [], gcsafe, raises: [], raises: [], + tags: [WriteIOEffect, TimeEffect, RootEffect].}
method stop(g: GossipSub): Future[void] {.stackTrace: false, ...gcsafe, raises: [], - raises: [], raises: [], tags: [RootEffect].}
method stop(g: GossipSub): InternalRaisesFuture[void, void] {.stackTrace: false, + ...raises: [], gcsafe, raises: [], raises: [], + tags: [WriteIOEffect, TimeEffect, RootEffect].}
method unsubscribePeer(g: GossipSub; peer: PeerId) {....raises: [], - tags: [WriteIOEffect, TimeEffect].}
proc heartbeat(g: GossipSub): Future[void] {.stackTrace: false, ...gcsafe, - raises: [], raises: [], raises: [], tags: [RootEffect].}
proc heartbeat(g: GossipSub): Future[void] {.stackTrace: false, ...raises: [], + gcsafe, raises: [], raises: [], tags: [RootEffect].}
proc rebalanceMesh(g: GossipSub; topic: string; metrics: ptr MeshMetrics = nil) {. - ...raises: [], raises: [], tags: [RootEffect].}
proc disconnectPeer(g: GossipSub; peer: PubSubPeer): Future[void] {. - stackTrace: false, ...gcsafe, raises: [], tags: [RootEffect].}
proc punishInvalidMessage(g: GossipSub; peer: PubSubPeer; msg: Message): Future[ - void] {.stackTrace: false, ...gcsafe, raises: [], tags: [RootEffect].}
proc scoringHeartbeat(g: GossipSub): Future[void] {.stackTrace: false, ...gcsafe, - raises: [], tags: [RootEffect].}
proc scoringHeartbeat(g: GossipSub): Future[void] {.stackTrace: false, + ...raises: [], gcsafe, tags: [RootEffect].}
proc broadcast(p: PubSub; sendPeers: auto; msg: RPCMsg) {....raises: [], raises: [].}
proc broadcast(p: PubSub; sendPeers: auto; msg: RPCMsg; isHighPriority: bool) {. + ...raises: [], raises: [].}
This procedure attempts to send a msg (of type RPCMsg) to a specified group of peers in the PubSub network.
+Parameters:
+High priority messages are sent immediately, while low priority messages are queued and sent only after all high priority messages have been sent.
+ Source - Edit + Editproc send(p: PubSub; peer: PubSubPeer; msg: RPCMsg) {....raises: [], raises: [], - tags: [RootEffect].}
proc send(p: PubSub; peer: PubSubPeer; msg: RPCMsg; isHighPriority: bool) {. + ...raises: [], raises: [], tags: [RootEffect, WriteIOEffect, TimeEffect].}
This procedure attempts to send a msg (of type RPCMsg) to the specified remote peer in the PubSub network.
+Parameters:
+High priority messages are sent immediately, while low priority messages are queued and sent only after all high priority messages have been sent.
+ Source @@ -890,14 +907,15 @@ class="link-seesrc" target="_blank">Sourceproc sendSubs(p: PubSub; peer: PubSubPeer; topics: openArray[string]; - subscribe: bool) {....raises: [], tags: [RootEffect].}
proc unsubscribe(p: PubSub; topic: string; handler: TopicHandler) {.public, - ...raises: [], tags: [RootEffect].}
proc unsubscribe(p: PubSub; topics: openArray[TopicPair]) {.public, ...raises: [], - tags: [RootEffect].}
method getOrCreatePeer(p: PubSub; peerId: PeerId; protos: seq[string]): PubSubPeer {. - base, ...gcsafe, raises: [], tags: [RootEffect, WriteIOEffect, TimeEffect].}
method handleConn(p: PubSub; conn: Connection; proto: string): Future[void] {. - base, stackTrace: false, ...gcsafe, raises: [], raises: [], raises: [], + base, stackTrace: false, ...raises: [], gcsafe, raises: [], raises: [], tags: [RootEffect].}
method onPubSubPeerEvent(p: PubSub; peer: PubSubPeer; event: PubSubPeerEvent) {. - base, ...gcsafe, raises: [], tags: [RootEffect].}
method onTopicSubscription(p: PubSub; topic: string; subscribed: bool) {.base, - ...gcsafe, raises: [], tags: [RootEffect].}
method publish(p: PubSub; topic: string; data: seq[byte]): Future[int] {.base, - public(), stackTrace: false, ...gcsafe, raises: [], raises: [], raises: [], + public(), stackTrace: false, ...raises: [], gcsafe, raises: [], raises: [], tags: [RootEffect].}
The return value is the number of neighbours that we attempted to send the message to, excluding self. Note that this is an optimistic number of attempts - the number of peers that actually receive the message might be lower.
Source - Edit + Editmethod rpcHandler(p: PubSub; peer: PubSubPeer; data: seq[byte]): Future[void] {. - base, stackTrace: false, ...gcsafe, raises: [], raises: [], raises: [], + base, stackTrace: false, ...raises: [], gcsafe, raises: [], raises: [], tags: [RootEffect].}
method subscribePeer(p: PubSub; peer: PeerId) {.base, ...gcsafe, raises: [], - tags: [RootEffect, WriteIOEffect, TimeEffect].}
method validate(p: PubSub; message: Message): Future[ValidationResult] {.base, - stackTrace: false, ...gcsafe, raises: [], raises: [], raises: [], + stackTrace: false, ...raises: [], gcsafe, raises: [], raises: [], tags: [RootEffect].}
RpcMessageQueue = ref object + sendPriorityQueue: Deque[Future[void]] + nonPriorityQueue: AsyncQueue[seq[byte]] + sendNonPriorityTask: Future[void] +
proc handle(p: PubSubPeer; conn: Connection): Future[void] {.stackTrace: false, - ...gcsafe, raises: [], raises: [], raises: [], tags: [RootEffect].}
proc send(p: PubSubPeer; msg: RPCMsg; anonymize: bool) {....raises: [], raises: [], - tags: [RootEffect].}
proc send(p: PubSubPeer; msg: RPCMsg; anonymize: bool; isHighPriority: bool) {. + ...raises: [], raises: [], tags: [RootEffect, WriteIOEffect, TimeEffect].}
Asynchronously sends an RPCMsg to a specified PubSubPeer with an option for anonymization.
+Parameters:
+High priority messages are sent immediately, while low priority messages are queued and sent only after all high priority messages have been sent.
Source - Edit + Editproc sendEncoded(p: PubSubPeer; msg: seq[byte]): Future[void] {....raises: [], - stackTrace: false, ...gcsafe, raises: [], raises: [], raises: [], - tags: [RootEffect].}
proc sendEncoded(p: PubSubPeer; msg: seq[byte]; isHighPriority: bool): Future[ + void] {....raises: [], tags: [WriteIOEffect, TimeEffect, RootEffect].}
Asynchronously sends an encoded message to a specified PubSubPeer.
+Parameters:
+High priority messages are sent immediately, while low priority messages are queued and sent only after all high priority messages have been sent.
Source - Edit + Editproc stopSendNonPriorityTask(p: PubSubPeer) {....raises: [], + tags: [WriteIOEffect, TimeEffect, RootEffect].}
proc request(rdv: RendezVous; ns: string; l: int = 1000'u64.int): Future[ - seq[PeerRecord]] {.stackTrace: false, ...gcsafe, raises: [], raises: [], + seq[PeerRecord]] {.stackTrace: false, ...raises: [], gcsafe, raises: [], raises: [], tags: [RootEffect].}
proc unsubscribe(rdv: RendezVous; ns: string): Future[void] {.stackTrace: false, - ...gcsafe, raises: [], raises: [], raises: [], tags: [RootEffect].}
method advertise(rdv: RendezVous; ns: string; ttl: Duration = MinimumDuration): Future[ - void] {.base, stackTrace: false, ...gcsafe, raises: [], raises: [], raises: [], + void] {.base, stackTrace: false, ...raises: [], gcsafe, raises: [], raises: [], tags: [RootEffect].}
method start(rdv: RendezVous): Future[void] {.stackTrace: false, ...gcsafe, - raises: [], raises: [], raises: [], tags: [RootEffect].}
method start(rdv: RendezVous): InternalRaisesFuture[void, (CancelledError,)] {. + stackTrace: false, ...raises: [], gcsafe, raises: [], raises: [], + tags: [WriteIOEffect, TimeEffect, RootEffect].}
method stop(rdv: RendezVous): Future[void] {.stackTrace: false, ...gcsafe, - raises: [], raises: [], raises: [], tags: [RootEffect].}
method stop(rdv: RendezVous): InternalRaisesFuture[void, void] {. + stackTrace: false, ...raises: [], gcsafe, raises: [], raises: [], + tags: [WriteIOEffect, TimeEffect, RootEffect].}
NoiseError = object of LPError
NoiseError = object of LPStreamError
method closeImpl(s: NoiseConnection): Future[void] {.stackTrace: false, ...gcsafe, - raises: [], raises: [], raises: [], tags: [RootEffect].}
method closeImpl(s: NoiseConnection): InternalRaisesFuture[void, void] {. + stackTrace: false, ...raises: [], gcsafe, raises: [], raises: [], + tags: [RootEffect].}
method handshake(p: Noise; conn: Connection; initiator: bool; - peerId: Opt[PeerId]): Future[SecureConn] {.stackTrace: false, - ...gcsafe, raises: [], raises: [], raises: [], tags: [RootEffect].}
method readMessage(sconn: NoiseConnection): Future[seq[byte]] {. - stackTrace: false, ...gcsafe, raises: [], raises: [], raises: [], - tags: [RootEffect].}
method readMessage(sconn: NoiseConnection): InternalRaisesFuture[seq[byte], + (CancelledError, LPStreamError)] {.stackTrace: false, ...raises: [], gcsafe, + raises: [], raises: [], + tags: [RootEffect].}
method write(sconn: NoiseConnection; message: seq[byte]): Future[void] {. - ...raises: [], tags: [WriteIOEffect, TimeEffect, RootEffect].}
method write(sconn: NoiseConnection; message: seq[byte]): InternalRaisesFuture[ + void, (CancelledError, LPStreamError)] {.stackTrace: false, ...raises: [], + gcsafe, raises: [], raises: [], tags: [WriteIOEffect, TimeEffect].}
method closeImpl(s: SecureConn): Future[void] {.stackTrace: false, ...gcsafe, - raises: [], gcsafe, raises: [], gcsafe, raises: [], tags: [RootEffect].}
method closeImpl(s: SecureConn): InternalRaisesFuture[void, void] {. + stackTrace: false, ...raises: [], gcsafe, gcsafe, raises: [], gcsafe, + raises: [], tags: [RootEffect].}
method handshake(s: Secure; conn: Connection; initiator: bool; + peerId: Opt[PeerId]): InternalRaisesFuture[SecureConn, + (CancelledError, LPStreamError)] {.base, stackTrace: false, ...raises: [], + gcsafe, gcsafe, raises: [], gcsafe, + raises: [], tags: [].}
method initStream(s: SecureConn) {....gcsafe, raises: [], + tags: [TimeEffect, RootEffect].}
method readMessage(c: SecureConn): InternalRaisesFuture[seq[byte], + (CancelledError, LPStreamError)] {.base, stackTrace: false, ...raises: [], + gcsafe, gcsafe, raises: [], gcsafe, + raises: [], tags: [].}
method handshake(s: Secure; conn: Connection; initiator: bool; - peerId: Opt[PeerId]): Future[SecureConn] {.base, - stackTrace: false, ...gcsafe, raises: [], gcsafe, raises: [], gcsafe, - raises: [], tags: [RootEffect].}
method readOnce(s: SecureConn; pbytes: pointer; nbytes: int): InternalRaisesFuture[ + int, (CancelledError, LPStreamError)] {.stackTrace: false, ...raises: [], + gcsafe, gcsafe, raises: [], gcsafe, raises: [], tags: [RootEffect].}
method initStream(s: SecureConn) {....gcsafe, raises: [], - tags: [RootEffect, TimeEffect].}
method readMessage(c: SecureConn): Future[seq[byte]] {.base, stackTrace: false, - ...gcsafe, raises: [], gcsafe, raises: [], gcsafe, raises: [], ++- method secure(s: Secure; conn: Connection; peerId: Opt[PeerId]): InternalRaisesFuture[ + Connection, (CancelledError, LPStreamError)] {.base, stackTrace: false, + ...raises: [], gcsafe, gcsafe, raises: [], gcsafe, raises: [], tags: [RootEffect].}- Source - Edit - -
---- -
method readOnce(s: SecureConn; pbytes: pointer; nbytes: int): Future[int] {. - stackTrace: false, ...gcsafe, raises: [], gcsafe, raises: [], gcsafe, - raises: [], tags: [RootEffect].}- - - - Source - Edit - -
--@@ -549,7 +558,7 @@ class="link-seesrc" target="_blank">Source- -
method secure(s: Secure; conn: Connection; initiator: bool; peerId: Opt[PeerId]): Future[ - Connection] {.base, ...gcsafe, raises: [], tags: [RootEffect].}- - - - Source - Edit + Edit
method closeImpl(s: BufferStream): Future[void] {....raises: [], tags: [RootEffect].}
method closeImpl(s: BufferStream): InternalRaisesFuture[void, void] {. + stackTrace: false, ...raises: [], gcsafe, raises: [], raises: [], + tags: [RootEffect].}
method initStream(s: BufferStream) {....raises: [], tags: [RootEffect, TimeEffect].}
method initStream(s: BufferStream) {....raises: [], tags: [TimeEffect, RootEffect].}
method pushData(s: BufferStream; data: seq[byte]): Future[void] {.base, - stackTrace: false, ...gcsafe, raises: [], raises: [], raises: [], - tags: [RootEffect].}
method pushData(s: BufferStream; data: seq[byte]): InternalRaisesFuture[void, + (CancelledError, LPStreamError)] {.base, stackTrace: false, ...raises: [], + gcsafe, raises: [], raises: [], + tags: [RootEffect].}
Write bytes to internal read buffer, use this to fill up the buffer with data.
pushTo will block if the queue is full, thus maintaining backpressure.
Source - Edit + Editmethod pushEof(s: BufferStream): Future[void] {.base, stackTrace: false, ...gcsafe, - raises: [], raises: [], raises: [], tags: [RootEffect].}
method pushEof(s: BufferStream): InternalRaisesFuture[void, + (CancelledError, LPStreamError)] {.base, stackTrace: false, ...raises: [], + gcsafe, raises: [], raises: [], + tags: [RootEffect].}
method readOnce(s: BufferStream; pbytes: pointer; nbytes: int): Future[int] {. - stackTrace: false, ...gcsafe, raises: [], raises: [], raises: [], - tags: [RootEffect].}
method readOnce(s: BufferStream; pbytes: pointer; nbytes: int): InternalRaisesFuture[ + int, (CancelledError, LPStreamError)] {.stackTrace: false, ...raises: [], + gcsafe, raises: [], raises: [], tags: [RootEffect].}
method closeImpl(s: ChronosStream): Future[void] {.stackTrace: false, ...gcsafe, - raises: [], raises: [], raises: [], tags: [RootEffect].}
method closeImpl(s: ChronosStream): InternalRaisesFuture[void, void] {. + stackTrace: false, ...raises: [], gcsafe, raises: [], raises: [], + tags: [RootEffect].}
method initStream(s: ChronosStream) {....raises: [], tags: [RootEffect, TimeEffect].}
method initStream(s: ChronosStream) {....raises: [], tags: [TimeEffect, RootEffect].}
method readOnce(s: ChronosStream; pbytes: pointer; nbytes: int): Future[int] {. - stackTrace: false, ...gcsafe, raises: [], raises: [], raises: [], - tags: [RootEffect].}
method readOnce(s: ChronosStream; pbytes: pointer; nbytes: int): InternalRaisesFuture[ + int, (CancelledError, LPStreamError)] {.stackTrace: false, ...raises: [], + gcsafe, raises: [], raises: [], tags: [RootEffect].}
method write(s: ChronosStream; msg: seq[byte]): Future[void] {....raises: [], - tags: [RootEffect].}
method write(s: ChronosStream; msg: seq[byte]): InternalRaisesFuture[void, + (CancelledError, LPStreamError)] {.stackTrace: false, ...raises: [], gcsafe, + raises: [], raises: [], + tags: [RootEffect].}
Connection = ref object of LPStream activity*: bool timeout*: Duration - timerTaskFut: Future[void] + timerTaskFut: Future[void].Raising([]) timeoutHandler*: TimeoutHandler peerId*: PeerId observedAddr*: Opt[MultiAddress] @@ -343,7 +343,7 @@ class="link-seesrc" target="_blank">Source-@@ -409,9 +409,9 @@ class="link-seesrc" target="_blank">Source Source - Edit + Edit @@ -433,14 +433,16 @@ class="link-seesrc" target="_blank">Source- +
TimeoutHandler = proc (): Future[void] {....gcsafe, raises: [].} TimeoutHandler = proc (): Future[void] {.async: (...raises: []).}- @@ -394,9 +394,9 @@ class="link-seesrc" target="_blank">Source Source - Edit + Edit
Methods
method closeImpl(s: Connection): Future[void] {....raises: [], tags: [RootEffect].}
method closeImpl(s: Connection): InternalRaisesFuture[void, void] {. + stackTrace: false, ...raises: [], gcsafe, raises: [], raises: [], + tags: [RootEffect].}
method initStream(s: Connection) {....raises: [], tags: [RootEffect, TimeEffect].}
method initStream(s: Connection) {....raises: [], tags: [TimeEffect, RootEffect].}
LPStreamIncorrectDefect = object of Defect
LPStreamLimitError = object of LPStreamError
LPStreamLimitError = object of LPStreamError
LPStreamReadError = object of LPStreamError - par*: ref CatchableError -
LPStreamWriteError = object of LPStreamError - par*: ref CatchableError -
proc closeWithEOF(s: LPStream): Future[void] {.public(), stackTrace: false, - ...gcsafe, raises: [], gcsafe, raises: [], gcsafe, raises: [], - tags: [RootEffect].}
proc closeWithEOF(s: LPStream): InternalRaisesFuture[void, void] {.public(), + stackTrace: false, ...raises: [], gcsafe, gcsafe, raises: [], gcsafe, + raises: [], tags: [RootEffect].}
Close the stream and wait for EOF - use this with half-closed streams where an EOF is expected to arrive from the other end.
@@ -704,65 +652,15 @@ class="link-seesrc" target="_blank">SourceIn particular, it must not be used when there is another concurrent read ongoing (which may be the case during cancellations)!
Source - Edit + Editproc join(s: LPStream): Future[void] {.public, ...gcsafe, raises: [], - tags: [RootEffect].}
proc newLPStreamClosedError(): ref LPStreamClosedError {....gcsafe, raises: [], - tags: [].}
proc newLPStreamConnDownError(parentException: ref Exception = nil): ref LPStreamConnDownError {. - ...gcsafe, raises: [], tags: [].}
proc newLPStreamEOFError(): ref LPStreamEOFError {....gcsafe, raises: [], tags: [].}
proc newLPStreamIncompleteError(): ref LPStreamIncompleteError {....gcsafe, + proc join(s: LPStream): InternalRaisesFuture[void, (CancelledError,)] {. + public(), stackTrace: false, ...raises: [], gcsafe, gcsafe, raises: [], gcsafe, raises: [], tags: [].}- @@ -774,16 +672,54 @@ class="link-seesrc" target="_blank">Source
proc newLPStreamIncorrectDefect(m: string): ref LPStreamIncorrectDefect {. +++- +
proc newLPStreamClosedError(): ref LPStreamClosedError {....gcsafe, raises: [], + tags: [].}- + + + Source + Edit + +
+++ proc newLPStreamConnDownError(parentException: ref Exception = nil): ref LPStreamConnDownError {. ...gcsafe, raises: [], tags: [].}- Source - Edit + Edit + +
+++- +
proc newLPStreamEOFError(): ref LPStreamEOFError {....gcsafe, raises: [], tags: [].}- + + + Source + Edit + +
++@@ -794,35 +730,9 @@ class="link-seesrc" target="_blank">Source Source - Edit - - -- +
proc newLPStreamIncompleteError(): ref LPStreamIncompleteError {....gcsafe, + raises: [], tags: [].}- + + + Source + Edit
proc newLPStreamReadError(msg: string): ref LPStreamReadError {....gcsafe, - raises: [], tags: [].}
proc newLPStreamReadError(p: ref CatchableError): ref LPStreamReadError {. - ...gcsafe, raises: [], tags: [].}
proc newLPStreamWriteError(p: ref CatchableError): ref LPStreamWriteError {. - ...gcsafe, raises: [], tags: [].}
proc readExactly(s: LPStream; pbytes: pointer; nbytes: int): Future[void] {. - public(), stackTrace: false, ...gcsafe, raises: [], gcsafe, raises: [], gcsafe, - raises: [], tags: [RootEffect].}
proc readExactly(s: LPStream; pbytes: pointer; nbytes: int): InternalRaisesFuture[ + void, (CancelledError, LPStreamError)] {.public(), stackTrace: false, + ...raises: [], gcsafe, gcsafe, raises: [], gcsafe, raises: [], + tags: [RootEffect].}
proc readLine(s: LPStream; limit = 0; sep = "\r\n"): Future[string] {.public(), - stackTrace: false, ...gcsafe, raises: [], gcsafe, raises: [], gcsafe, - raises: [], tags: [RootEffect].}
proc readLine(s: LPStream; limit = 0; sep = "\r\n"): InternalRaisesFuture[ + string, (CancelledError, LPStreamError)] {.public(), stackTrace: false, + ...raises: [], gcsafe, gcsafe, raises: [], gcsafe, raises: [], + tags: [RootEffect].}
proc readLp(s: LPStream; maxSize: int): Future[seq[byte]] {....gcsafe, public(), - stackTrace: false, ...gcsafe, raises: [], gcsafe, raises: [], gcsafe, - raises: [], tags: [RootEffect].}
proc readLp(s: LPStream; maxSize: int): InternalRaisesFuture[seq[byte], + (CancelledError, LPStreamError)] {.public(), stackTrace: false, ...raises: [], + gcsafe, gcsafe, raises: [], gcsafe, + raises: [], tags: [RootEffect].}
proc readVarint(conn: LPStream): Future[uint64] {....gcsafe, public(), - stackTrace: false, ...gcsafe, raises: [], gcsafe, raises: [], gcsafe, - raises: [], tags: [RootEffect].}
proc readVarint(conn: LPStream): InternalRaisesFuture[uint64, + (CancelledError, LPStreamError)] {.public(), stackTrace: false, ...raises: [], + gcsafe, gcsafe, raises: [], gcsafe, + raises: [], tags: [RootEffect].}
proc setupStreamTracker(name: string): StreamTracker {....gcsafe, raises: [], - tags: [RootEffect].}
proc write(s: LPStream; msg: string): Future[void] {.public, ...gcsafe, raises: [], - tags: [].}
proc write(s: LPStream; msg: string): InternalRaisesFuture[void, + (CancelledError, LPStreamError)] {.public(), stackTrace: false, ...raises: [], + gcsafe, gcsafe, raises: [], gcsafe, + raises: [], tags: [].}
proc writeLp(s: LPStream; msg: openArray[byte]): Future[void] {.public, ...gcsafe, - raises: [], tags: [].}
proc writeLp(s: LPStream; msg: openArray[byte]): InternalRaisesFuture[void, + (CancelledError, LPStreamError)] {.public(), stackTrace: false, ...raises: [], + gcsafe, gcsafe, raises: [], gcsafe, + raises: [], tags: [].}
proc writeLp(s: LPStream; msg: string): Future[void] {.public, ...gcsafe, - raises: [], tags: [].}
proc writeLp(s: LPStream; msg: string): InternalRaisesFuture[void, + (CancelledError, LPStreamError)] {.public(), stackTrace: false, ...raises: [], + gcsafe, gcsafe, raises: [], gcsafe, + raises: [], tags: [].}
method close(s: LPStream): Future[void] {.base, public(), stackTrace: false, - ...gcsafe, raises: [], gcsafe, raises: [], gcsafe, raises: [], - tags: [RootEffect].}
method close(s: LPStream): InternalRaisesFuture[void, void] {.base, public(), + stackTrace: false, ...raises: [], gcsafe, gcsafe, raises: [], gcsafe, + raises: [], tags: [].}
method closeImpl(s: LPStream): Future[void] {.base, stackTrace: false, ...gcsafe, - raises: [], gcsafe, raises: [], gcsafe, raises: [], tags: [RootEffect].}
method initStream(s: LPStream) {.base, ...gcsafe, raises: [], - tags: [RootEffect, TimeEffect].}
method readOnce(s: LPStream; pbytes: pointer; nbytes: int): Future[int] {.base, - public(), stackTrace: false, ...gcsafe, raises: [], gcsafe, raises: [], gcsafe, - raises: [], tags: [RootEffect].}
method write(s: LPStream; msg: seq[byte]): Future[void] {.base, public, ...gcsafe, + method closeImpl(s: LPStream): InternalRaisesFuture[void, void] {.base, + stackTrace: false, ...raises: [], gcsafe, gcsafe, raises: [], gcsafe, raises: [], tags: [].}- Source - Edit + Edit + +
+
method initStream(s: LPStream) {.base, ...gcsafe, raises: [], tags: [TimeEffect].}
method readOnce(s: LPStream; pbytes: pointer; nbytes: int): InternalRaisesFuture[ + int, (CancelledError, LPStreamError)] {.base, public(), stackTrace: false, + ...raises: [], gcsafe, gcsafe, raises: [], gcsafe, raises: [], tags: [].}
method write(s: LPStream; msg: seq[byte]): InternalRaisesFuture[void, + (CancelledError, LPStreamError)] {.base, public(), stackTrace: false, + ...raises: [], gcsafe, gcsafe, raises: [], + gcsafe, raises: [], tags: [].}
proc start(s: Switch): Future[void] {....gcsafe, public(), stackTrace: false, - ...gcsafe, raises: [], raises: [], - raises: [], tags: [RootEffect].}
proc start(s: Switch): Future[void] {.public(), stackTrace: false, ...raises: [], + gcsafe, raises: [], raises: [], + tags: [RootEffect].}
proc stop(s: Switch): Future[void] {.public(), stackTrace: false, ...gcsafe, - raises: [], raises: [], raises: [], + proc stop(s: Switch): Future[void] {.public(), stackTrace: false, ...raises: [], + gcsafe, raises: [], raises: [], tags: [RootEffect].}- @@ -654,9 +654,8 @@ class="link-seesrc" target="_blank">Source
method connect(s: Switch; peerId: PeerId; addrs: seq[MultiAddress]; - forceDial = false; reuseConnection = true; - upgradeDir = Direction.Out): Future[void] {.public, ...raises: [], - tags: [RootEffect].}
method run(self: Service; switch: Switch): Future[void] {.base, ...gcsafe, - stackTrace: false, ...gcsafe, raises: [], raises: [], raises: [], + method run(self: Service; switch: Switch): Future[void] {.base, + stackTrace: false, ...raises: [], gcsafe, raises: [], raises: [], tags: [RootEffect].}- @@ -709,8 +708,8 @@ class="link-seesrc" target="_blank">Source
method setup(self: Service; switch: Switch): Future[bool] {.base, ...gcsafe, - stackTrace: false, ...gcsafe, raises: [], raises: [], raises: [], + method setup(self: Service; switch: Switch): Future[bool] {.base, + stackTrace: false, ...raises: [], gcsafe, raises: [], raises: [], tags: [RootEffect].}- @@ -723,8 +722,8 @@ class="link-seesrc" target="_blank">Source
method stop(self: Service; switch: Switch): Future[bool] {.base, ...gcsafe, - stackTrace: false, ...gcsafe, raises: [], raises: [], raises: [], + method stop(self: Service; switch: Switch): Future[bool] {.base, + stackTrace: false, ...raises: [], gcsafe, raises: [], raises: [], tags: [RootEffect].}- @@ -741,7 +740,7 @@ class="link-seesrc" target="_blank">Source
Exports
-ConnManager, getStream, PeerEventKind, getStream, addPeerEventHandler, new, ConnEventKind, PeerEventHandler, selectMuxer, getConnections, contains, removePeerEventHandler, expectConnection, ConnEvent, connCount, ConnEventHandler, addConnEventHandler, triggerConnEvent, removeConnEventHandler, contains, triggerPeerEvents, AlreadyExpectingConnectionError, PeerEvent, TooManyConnectionsError, getStream, trackConnection, close, MaxConnectionsPerPeer, connectedPeers, selectMuxer, trackMuxer, getOutgoingSlot, slotsAvailable, dropPeer, getIncomingSlot, storeMuxer, release, MaxConnections, ConnectionSlot, newLPStreamWriteError, DNS_OR_IP, AlreadyExpectingConnectionError, shortLog, init, random, new, UDP_DNS, $, getProtoHeader, MaxConnectionsPerPeer, ephemeral, close, MaPatternOp, WS_DNS, initVBuffer, <=, MaxSizeError, decodeProposal, ProtoFlags, ==, getLen, maxIncomingStreams, ECDHEScheme, shortLog, closed, addConnEventHandler, [], init, new, macOpenArray, random, init, new, Secret, peekVarint, random, handshake, MaxConnections, $, validate, mapOr, MaError, init, bytes, UpgradeFailedError, IdentityInvalidMsgError, maxInlineKeyLength, addHandler, TranscoderDNS, QUIC, ProtoVersion, [], init, ephemeral, withValue, getRequiredField, getField, init, writeLp, removeConnEventHandler, WS_IP, write, public, MAKind, decode, write, write, init, checkFieldNumber, valueOr, codec, getRepeatedField, matchPartial, addObservation, IdentityNoMatchError, libp2p_pki_schemes, push, getBytes, len, trackConnection, &, readLp, HTTP, initVBuffer, start, atEof, PeerEventKind, getOutgoingSlot, peekSeq, toOpt, fullAddrs, payloadType, getProtoHeader, LPStreamError, init, $, IP, protoAddress, newRng, ==, IdentifyPushCodec, SecureConn, checkValid, getPublicKey, CircuitRelay, ProtoHeader, WebSockets, libp2p_failed_upgrades_incoming, exceptionToAssert, extractPublicKey, mapAnd, new, UDP_IP, new, newLPStreamEOFError, selectMuxer, connCount, write, DNSADDR, LPError, AddressMapper, IdentifyPushHandler, write, ConnManager, WSS, getField, TCP_IP, selectMuxer, hash, writePacked, handle, init, closeImpl, Identify, toBytes, TCP_DNS, shortLog, encode, len, capLen, init, protoName, protoArgument, PeerEventHandler, LPProtoHandler, secure, toRawBytes, IdentifyPush, getStream, MaPattern, TranscoderIP6Zone, $, initProtoBuffer, newLPStreamReadError, WSS_DNS, list, match, <, CryptoResult, parseFullAddress, ProtoResult, WebRTCDirect, init, upgrade, UDP, TranscoderOnion, StreamTracker, IdentifyNoPubKeyError, write, init, LPStreamResetError, isEmpty, writeArray, writeLp, getRawBytes, new, LPStreamIncompleteError, PeerId, LPStreamEOFError, readOnce, maxIncomingStreams=, IP6, shortLog, new, release, initVBuffer, PKScheme, new, payload, triggerConnEvent, triggerPeerEvents, stretchKeys, init, Connection, write, TCP, PrivateKey, dropPeer, getBytes, start, newLPStreamIncorrectDefect, init, close, &=, PeerInfoError, newLPStreamClosedError, random, compilesOr, handle, trackMuxer, init, initProtoBuffer, toException, DNS, Upgrade, goffset, HandlerHolder, >, SecureConnTrackerName, KeyPair, init, high, toString, cmp, init, SupportedWireTypes, formatItIMPL, formatItIMPL, initStream, hash, formatItIMPL, Signature, formatItIMPL, getStream, IPFS, shortLog, readOnce, init, init, secure, isEmpty, ConnEventKind, MultiAddress, ProtoScalar, shortLog, LPStreamIncorrectDefect, contains, hex, expandItIMPL, protocols, codec=, init, DefaultMaxIncomingStreams, HTTPS, UNIX, encode, tryAndWarn, TooManyConnectionsError, ConnectionSlot, getPtr, write, TLS_WS, sign, readSeq, addHandler, storeMuxer, TranscoderIP4, formatItIMPL, PeerEvent, supported, MaResult, init, ProtoField, write, getStream, writeSeq, DigestSheme, ConnEvent, ==, $, DNS6, [], IpTransportProtocol, toOpenArray, init, allFuturesThrowing, IP4, TranscoderPort, isEnough, safeConvert, addPeerEventHandler, init, createExchange, >=, expectConnection, init, payloadDomain, $, withValue, init, init, LPStreamLimitError, TranscoderOnion3, SignedPayload, closeImpl, toBytes, Secure, newLPStreamLimitError, keyOpenArray, init, match, WebSockets_DNS, $, closeImpl, isEmpty, LPStreamReadError, decode, connectedPeers, mac, new, getRequiredRepeatedField, init, newLPStreamIncompleteError, newLPStreamReadError, initProtoBuffer, MAProtocol, newLPStreamResetError, getPackedRepeatedField, initStream, contains, getField, shortLog, DNS4, getWrapped, readArray, selectBest, write, P2PPattern, getWrapped, Envelope, hasPublicKey, toException, contains, decode, init, isEnough, init, Reliable, init, addrs, hex, slotsAvailable, data, readMessage, WS, AgentVersion, init, init, MultistreamSelect, encode, LPProtocol, DNSANY, TimeoutHandler, getField, match, getField, writeLPVarint, iv, DefaultConnectionTimeout, readLine, Eof, CryptoError, getField, append, init, parseFullAddress, WSS_IP, LPStreamConnDownError, PeerRecord, decodeExchange, SupportedSchemes, getRepeatedField, LPStreamWriteError, getField, select, hash, Unreliable, SupportedSchemesInt, random, checkFutures, libp2p_failed_upgrades_outgoing, shuffle, init, validate, Matcher, mapEq, getField, readVarint, removePeerEventHandler, Onion3, getBytes, LPStreamTrackerName, identify, select, concat, TranscoderP2P, PeerInfo, AddressInfo, ConnectionTrackerName, TranscoderIP6, finish, write, EnvelopeError, verify, IdentifyInfo, IdentifyError, addHandler, encode, len, newLPStreamRemoteClosedError, createProposal, MaPatResult, Direction, ProtoBuffer, IdentifyCodec, key, InvalidVarintError, shortLog, ==, init, write, getBytes, write, init, UTP, getConnections, toBytes, peekArray, init, getMostObservedProtosAndPorts, ObservedAddrManager, PublicKey, ConnEventHandler, WebSockets_IP, decodeMsg, VBuffer, update, writePBVarint, ProtoFieldKind, readExactly, protoArgument, getRepeatedField, ProtoError, newLPStreamConnDownError, init, write, initStream, getField, readVarint, ivOpenArray, closeWithEOF, finish, TcpOnion3, orError, vsizeof, getField, LPStreamRemoteClosedError, setupStreamTracker, guessDialableAddr, MultiStreamError, protoCode, stop, MaInvalidAddress, select, LPStream, LPStreamClosedError, RsaDefaultKeySize, writeVarint, getIncomingSlot, items, write, toBytes, getOrder, TranscoderUnix, SignedPeerRecord, init, stop, join, dial, dial, dial, connect, checkFutures, tryAndWarn, LPError, addTransport, addTransport, connect, toException, new, dial, allFuturesThrowing, Dialer, tryDial, DialFailedError, connect, Dial, connect, toException, tryDial, SPRBook, PeerBook, ProtoBook, AddressBook, ProtoVersionBook, SeqPeerBook, KeyBook, PeerBookChangeHandler, AgentBook, new, PeerStore +ConnManager, getStream, PeerEventKind, getStream, addPeerEventHandler, new, ConnEventKind, PeerEventHandler, selectMuxer, getConnections, contains, removePeerEventHandler, expectConnection, ConnEvent, connCount, ConnEventHandler, addConnEventHandler, triggerConnEvent, removeConnEventHandler, contains, triggerPeerEvents, AlreadyExpectingConnectionError, PeerEvent, TooManyConnectionsError, getStream, trackConnection, close, MaxConnectionsPerPeer, connectedPeers, selectMuxer, trackMuxer, getOutgoingSlot, slotsAvailable, dropPeer, getIncomingSlot, storeMuxer, release, MaxConnections, ConnectionSlot, DNS_OR_IP, AlreadyExpectingConnectionError, shortLog, init, random, new, UDP_DNS, $, getProtoHeader, MaxConnectionsPerPeer, ephemeral, close, decode, MaPatternOp, ==, WS_DNS, initVBuffer, getProtoHeader, MaxSizeError, decodeProposal, ProtoFlags, ==, getLen, maxIncomingStreams, ECDHEScheme, shortLog, init, closed, addConnEventHandler, [], init, new, macOpenArray, random, init, new, Secret, peekVarint, random, handshake, MaxConnections, $, validate, mapOr, MaError, init, UpgradeFailedError, IdentityInvalidMsgError, maxInlineKeyLength, addHandler, TranscoderDNS, QUIC, ProtoVersion, [], init, finish, withValue, getRequiredField, getField, supported, removeConnEventHandler, libp2p_pki_schemes, WS_IP, write, public, MAKind, write, write, init, getField, checkFieldNumber, valueOr, codec, getRepeatedField, matchPartial, addObservation, IdentityNoMatchError, removePeerEventHandler, push, getBytes, len, trackConnection, &, init, readLp, HTTP, initVBuffer, start, atEof, PeerEventKind, getOutgoingSlot, write, toOpt, fullAddrs, payloadType, <=, LPStreamError, init, decode, $, IP, protoAddress, newRng, IdentifyPushCodec, SecureConn, checkValid, getPublicKey, CircuitRelay, ProtoHeader, WebSockets, libp2p_failed_upgrades_incoming, exceptionToAssert, extractPublicKey, mapAnd, new, UDP_IP, new, newLPStreamEOFError, selectMuxer, init, connCount, write, DNSADDR, LPError, mac, AddressMapper, IdentifyPushHandler, write, ConnManager, WSS, getField, TCP_IP, selectMuxer, writePacked, handle, init, closeImpl, Identify, readSeq, toBytes, TCP_DNS, shortLog, encode, len, capLen, key, protoName, protoArgument, PeerEventHandler, LPProtoHandler, secure, toRawBytes, IdentifyPush, getStream, MaPattern, TranscoderIP6Zone, $, initProtoBuffer, init, WSS_DNS, list, match, <, CryptoResult, WebSockets_DNS, readMessage, ProtoResult, WebRTCDirect, init, upgrade, UDP, PeerInfo, TranscoderOnion, StreamTracker, IdentifyNoPubKeyError, write, init, getConnections, LPStreamResetError, isEmpty, writeArray, getRawBytes, new, LPStreamIncompleteError, PeerId, LPStreamEOFError, maxIncomingStreams=, IP6, shortLog, new, release, initVBuffer, PKScheme, init, new, payload, triggerConnEvent, triggerPeerEvents, init, Connection, write, TCP, PrivateKey, dropPeer, getBytes, start, write, init, close, &=, PeerInfoError, newLPStreamClosedError, random, compilesOr, handle, trackMuxer, initProtoBuffer, toException, DNS, finish, Upgrade, goffset, HandlerHolder, >, SecureConnTrackerName, KeyPair, init, high, toString, cmp, init, SupportedWireTypes, formatItIMPL, formatItIMPL, initStream, hash, formatItIMPL, Signature, formatItIMPL, getStream, IPFS, shortLog, readOnce, init, init, secure, isEmpty, ConnEventKind, MultiAddress, ProtoScalar, shortLog, contains, hex, expandItIMPL, protocols, codec=, bytes, DefaultMaxIncomingStreams, hash, HTTPS, UNIX, encode, tryAndWarn, TooManyConnectionsError, ConnectionSlot, getPtr, getBytes, TLS_WS, sign, readVarint, addHandler, storeMuxer, TranscoderIP4, formatItIMPL, PeerEvent, data, MaResult, ProtoField, IdentifyCodec, getStream, writeSeq, DigestSheme, ConnEvent, init, ==, $, DNS6, [], IpTransportProtocol, toOpenArray, init, IP4, TranscoderPort, isEnough, safeConvert, addPeerEventHandler, init, createExchange, >=, expectConnection, ephemeral, payloadDomain, update, $, withValue, init, LPStreamLimitError, TranscoderOnion3, SignedPayload, closeImpl, toBytes, Secure, newLPStreamLimitError, keyOpenArray, match, parseFullAddress, $, closeImpl, isEmpty, writeLp, connectedPeers, new, getRequiredRepeatedField, init, newLPStreamIncompleteError, initProtoBuffer, MAProtocol, newLPStreamResetError, decode, getPackedRepeatedField, initStream, contains, init, getField, shortLog, DNS4, getWrapped, readArray, selectBest, peekSeq, P2PPattern, getWrapped, Envelope, hasPublicKey, toException, contains, isEnough, init, Reliable, init, addrs, hex, slotsAvailable, write, readOnce, WS, AgentVersion, init, DNSANY, MultistreamSelect, encode, LPProtocol, init, TimeoutHandler, stretchKeys, getField, match, getField, writeLPVarint, iv, DefaultConnectionTimeout, readLine, Eof, CryptoError, getField, append, init, parseFullAddress, WSS_IP, LPStreamConnDownError, PeerRecord, decodeExchange, SupportedSchemes, getRepeatedField, getField, select, hash, Unreliable, SupportedSchemesInt, random, checkFutures, libp2p_failed_upgrades_outgoing, shuffle, init, validate, Matcher, mapEq, getField, init, Onion3, write, LPStreamTrackerName, identify, select, concat, TranscoderP2P, AddressInfo, ConnectionTrackerName, TranscoderIP6, init, write, EnvelopeError, verify, IdentifyInfo, IdentifyError, addHandler, encode, len, newLPStreamRemoteClosedError, createProposal, MaPatResult, Direction, ProtoBuffer, init, InvalidVarintError, shortLog, ==, write, getBytes, write, init, UTP, toBytes, peekArray, init, getMostObservedProtosAndPorts, init, ObservedAddrManager, PublicKey, ConnEventHandler, WebSockets_IP, decodeMsg, VBuffer, writeLp, writePBVarint, ProtoFieldKind, readExactly, protoArgument, getRepeatedField, ProtoError, newLPStreamConnDownError, initStream, readVarint, ivOpenArray, closeWithEOF, TcpOnion3, orError, vsizeof, getField, LPStreamRemoteClosedError, guessDialableAddr, MultiStreamError, protoCode, stop, MaInvalidAddress, select, LPStream, LPStreamClosedError, RsaDefaultKeySize, writeVarint, getIncomingSlot, items, write, toBytes, getOrder, TranscoderUnix, SignedPeerRecord, init, stop, join, dial, dial, dial, connect, checkFutures, tryAndWarn, LPError, addTransport, addTransport, connect, toException, new, dial, Dialer, tryDial, DialFailedError, connect, Dial, connect, toException, tryDial, SPRBook, PeerBook, ProtoBook, AddressBook, ProtoVersionBook, SeqPeerBook, KeyBook, PeerBookChangeHandler, AgentBook, new, PeerStore
TcpTransportTracker = ref object of TrackerBase - opened*: uint64 - closed*: uint64 -
proc connHandler(self: TcpTransport; client: StreamTransport; observedAddr: Opt[MultiAddress]; dir: Direction): Future[ - Connection] {.stackTrace: false, ...gcsafe, raises: [], raises: [], raises: [], + Connection] {.stackTrace: false, ...raises: [], gcsafe, raises: [], raises: [], tags: [RootEffect].}
method accept(self: TcpTransport): Future[Connection] {.stackTrace: false, + ...raises: [], gcsafe, raises: [], raises: [], tags: [RootEffect].}
method dial(self: TcpTransport; hostname: string; address: MultiAddress; peerId: Opt[PeerId] = Opt.none(PeerId)): Future[Connection] {. - ...gcsafe, stackTrace: false, ...gcsafe, raises: [], raises: [], raises: [], + stackTrace: false, ...raises: [], gcsafe, raises: [], raises: [], tags: [RootEffect].}
method start(self: TcpTransport; addrs: seq[MultiAddress]): Future[void] {. - stackTrace: false, ...gcsafe, raises: [], raises: [], raises: [], + stackTrace: false, ...raises: [], gcsafe, raises: [], raises: [], tags: [RootEffect].}
method stop(self: TcpTransport): Future[void] {....gcsafe, stackTrace: false, - ...gcsafe, raises: [], raises: [], raises: [], tags: [RootEffect].}
method stop(self: TcpTransport): Future[void] {.stackTrace: false, ...raises: [], + gcsafe, raises: [], raises: [], tags: [RootEffect].}
method start(self: Transport; addrs: seq[MultiAddress]): Future[void] {.base, - stackTrace: false, ...gcsafe, raises: [], raises: [], raises: [], + stackTrace: false, ...raises: [], gcsafe, raises: [], raises: [], tags: [RootEffect].}
method stop(self: Transport): Future[void] {.base, stackTrace: false, ...gcsafe, - raises: [], raises: [], raises: [], tags: [RootEffect].}
method stop(self: Transport): Future[void] {.base, stackTrace: false, + ...raises: [], gcsafe, raises: [], raises: [], tags: [RootEffect].}
method upgrade(self: Transport; conn: Connection; direction: Direction; - peerId: Opt[PeerId]): Future[Muxer] {.base, ...gcsafe, raises: [], - tags: [].}
method upgrade(self: Transport; conn: Connection; peerId: Opt[PeerId]): Future[ + Muxer] {.base, ...gcsafe, raises: [], tags: [].}
method accept(self: WsTransport): Future[Connection] {....gcsafe, - stackTrace: false, ...gcsafe, raises: [], raises: [], raises: [], - tags: [RootEffect].}
method accept(self: WsTransport): Future[Connection] {.stackTrace: false, + ...raises: [], gcsafe, raises: [], raises: [], tags: [RootEffect].}
method closeImpl(s: WsStream): Future[void] {.stackTrace: false, ...gcsafe, - raises: [], raises: [], raises: [], tags: [RootEffect].}
method closeImpl(s: WsStream): InternalRaisesFuture[void, void] {. + stackTrace: false, ...raises: [], gcsafe, raises: [], raises: [], + tags: [RootEffect].}
method dial(self: WsTransport; hostname: string; address: MultiAddress; + peerId: Opt[PeerId] = Opt.none(PeerId)): Future[Connection] {. + stackTrace: false, ...raises: [], gcsafe, raises: [], raises: [], + tags: [RootEffect].}
method initStream(s: WsStream) {....raises: [], tags: [RootEffect, TimeEffect].}
method initStream(s: WsStream) {....raises: [], tags: [TimeEffect, RootEffect].}
method readOnce(s: WsStream; pbytes: pointer; nbytes: int): Future[int] {. - stackTrace: false, ...gcsafe, raises: [], raises: [], raises: [], - tags: [RootEffect].}
method readOnce(s: WsStream; pbytes: pointer; nbytes: int): InternalRaisesFuture[ + int, (CancelledError, LPStreamError)] {.stackTrace: false, ...raises: [], + gcsafe, raises: [], raises: [], tags: [RootEffect].}
method start(self: WsTransport; addrs: seq[MultiAddress]): Future[void] {. - stackTrace: false, ...gcsafe, raises: [], raises: [], raises: [], + stackTrace: false, ...raises: [], gcsafe, raises: [], raises: [], tags: [RootEffect].}
method stop(self: WsTransport): Future[void] {....gcsafe, stackTrace: false, - ...gcsafe, raises: [], raises: [], raises: [], tags: [RootEffect].}
method stop(self: WsTransport): Future[void] {.stackTrace: false, ...raises: [], + gcsafe, raises: [], raises: [], tags: [RootEffect].}
method write(s: WsStream; msg: seq[byte]): Future[void] {.stackTrace: false, - ...gcsafe, raises: [], raises: [], raises: [], tags: [RootEffect].}
method write(s: WsStream; msg: seq[byte]): InternalRaisesFuture[void, + (CancelledError, LPStreamError)] {.stackTrace: false, ...raises: [], gcsafe, + raises: [], raises: [], + tags: [RootEffect].}
proc mux(self: MuxedUpgrade; conn: Connection; direction: Direction): Future[ - Muxer] {....gcsafe, stackTrace: false, ...gcsafe, raises: [], raises: [], - raises: [], tags: [RootEffect].}
proc mux(self: MuxedUpgrade; conn: Connection): Future[Muxer] {. + stackTrace: false, ...raises: [], gcsafe, raises: [], raises: [], + tags: [RootEffect].}
method upgrade(self: MuxedUpgrade; conn: Connection; direction: Direction; - peerId: Opt[PeerId]): Future[Muxer] {.stackTrace: false, ...gcsafe, - raises: [], raises: [], raises: [], tags: [RootEffect].}
method upgrade(self: MuxedUpgrade; conn: Connection; peerId: Opt[PeerId]): Future[ + Muxer] {.stackTrace: false, ...raises: [], gcsafe, raises: [], raises: [], + tags: [RootEffect].}
proc secure(self: Upgrade; conn: Connection; direction: Direction; - peerId: Opt[PeerId]): Future[Connection] {....gcsafe, - stackTrace: false, ...gcsafe, raises: [], gcsafe, raises: [], gcsafe, - raises: [], tags: [RootEffect].}
proc secure(self: Upgrade; conn: Connection; peerId: Opt[PeerId]): Future[ + Connection] {.stackTrace: false, ...raises: [], gcsafe, gcsafe, raises: [], + gcsafe, raises: [], tags: [RootEffect].}
method upgrade(self: Upgrade; conn: Connection; direction: Direction; - peerId: Opt[PeerId]): Future[Muxer] {.base, ...gcsafe, raises: [], - tags: [].}
method upgrade(self: Upgrade; conn: Connection; peerId: Opt[PeerId]): Future[ + Muxer] {.base, ...gcsafe, raises: [], tags: [].}
template withValue[T](self: Opt[T] | Option[T]; value, body: untyped): untyped
This template provides a convenient way to work with Option types in Nim. It allows you to execute a block of code (body) only when the Option is not empty.
+self is the Option instance being checked. value is the variable name to be used within the body for the unwrapped value. body is a block of code that is executed only if self contains a value.
+The value within body is automatically unwrapped from the Option, making it simpler to work with without needing explicit checks or unwrapping.
+Example:
+let myOpt = Opt.some(5) +myOpt.withValue(value): + echo value # Will print 5 ++
Note: This is a template, and it will be inlined at the call site, offering good performance.
Source diff --git a/message-id-mem/libp2p/utils/future.html b/message-id-mem/libp2p/utils/future.html index d189c28ba..ef0209709 100644 --- a/message-id-mem/libp2p/utils/future.html +++ b/message-id-mem/libp2p/utils/future.html @@ -250,7 +250,7 @@ class="link-seesrc" target="_blank">Sourceproc anyCompleted[T](futs: seq[Future[T]]): Future[Future[T]] {. - stackTrace: false, ...gcsafe, raises: [], raises: [], raises: [].}
proc acquire(s: AsyncSemaphore): Future[void] {....raises: [], tags: [RootEffect].}
proc acquire(s: AsyncSemaphore): Future[void] {....raises: [], tags: [].}
proc release(s: AsyncSemaphore) {....raises: [], tags: [RootEffect].}
proc release(s: AsyncSemaphore) {....raises: [], tags: [].}