Types
Connection = ref object of LPStream activity*: bool timeout*: Duration timeoutHandler*: TimeoutHandler peerId*: PeerId observedAddr*: Opt[MultiAddress] localAddr*: Opt[MultiAddress] protocol*: string transportDir*: Direction when defined(libp2p_agents_metrics): shortAgent*: string
- Source Edit
libp2p_network_bytes = IgnoredCollector
- Source Edit
TimeoutHandler = proc (): Future[void] {.async: (...raises: []).}
- Source Edit
Consts
ConnectionTrackerName = "Connection"
- Source Edit
DefaultConnectionTimeout = (value: 300000000000)
- Source Edit
Procs
func hash(p: Connection): Hash {....raises: [], tags: [], forbids: [].}
- Source Edit
proc new(C: type Connection; peerId: PeerId; dir: Direction; observedAddr: Opt[MultiAddress] = Opt.none(MultiAddress); localAddr: Opt[MultiAddress] = Opt.none(MultiAddress); timeout: Duration = DefaultConnectionTimeout; timeoutHandler: TimeoutHandler = nil): Connection {....raises: [].}
- Source Edit
func shortLog(conn: Connection): string {....raises: [], tags: [], forbids: [].}
- Source Edit
Methods
method closeImpl(s: Connection): InternalRaisesFuture[void, void] {. ...stackTrace: false, raises: [], gcsafe, raises: [], tags: [RootEffect], forbids: [].}
- Source Edit
method closeWrite(s: Connection): InternalRaisesFuture[void, void] {.base, ...stackTrace: false, raises: [], gcsafe, raises: [], tags: [RootEffect], forbids: [].}
- Close the write side of the connection Subclasses should implement this for their specific transport Default implementation just closes the entire connection Source Edit
method getWrapped(s: Connection): Connection {.base, ...raises: [], tags: [], forbids: [].}
- Source Edit
method initStream(s: Connection) {....raises: [], tags: [TimeEffect, RootEffect], forbids: [].}
- Source Edit
Templates
template chroniclesFormatItIMPL(it: Connection): auto {..}
- Source Edit
Exports
-
InvalidVarintError, atEof, newLPStreamIncompleteError, writeLp, initStream, newLPStreamResetError, readVarint, LPStreamError, closeWithEOF, newLPStreamLimitError, join, LPStreamResetError, write, Eof, newLPStreamClosedError, LPStreamIncompleteError, close, LPStreamRemoteClosedError, readLp, LPStreamEOFError, LPStreamTrackerName, shortLog, LPStreamConnDownError, LPStreamLimitError, readOnce, toException, toException, chroniclesFormatItIMPL, LPStream, LPStreamClosedError, newLPStreamEOFError, StreamTracker, MaxSizeError, write, resetImpl, closeImpl, writeLp, newLPStreamRemoteClosedError, checkFutures, readLine, reset, Direction, readExactly, wasResetLocally, newLPStreamConnDownError, closed, LPError, shortLog, UDP_DNS, items, ephemeral, init, replaceIp, MaPatternOp, <=, filterIt, init, $, validate, chroniclesFormatItIMPL, init, Memory, getPubKey, TLS_WS, TranscoderDNS, init, ephemeral, PeerInfoObserver, getIp, generateBytes, MAKind, init, getRepeatedField, generate, getBytes, WebSockets, &, peekSeq, TCP_IP4, fullAddrs, init, QUIC_V1_IP, ==, withValue, getPublicKey, libp2p_multiaddress_exts, getPart, DNSANY, DNSADDR, AddressMapper, WSS, init, toBytes, TCP_DNS, shortLog, encode, UDP_IP4, len, supported, init, ==, TranscoderIP6Zone, $, WSS_DNS, <, PeerAddressPolicy, $, PeerInfo, TranscoderOnion, write, key, writeArray, PeerId, IP6, shortLog, payload, stretchKeys, addObserver, generate, TCP, PrivateKey, getBytes, &=, newBearSslRng, TranscoderMemory, init, $, getRawBytes, KeyPair, chroniclesFormatItIMPL, shortLog, init, isEmpty, readFieldInto, data, HTTPS, QUIC_DNS, supportsPacked, TranscoderIP6, encode, getProtocolArgument, MaResult, finish, DNS6, expandAddrs, [], IpTransportProtocol, TranscoderPort, >=, payloadDomain, init, TranscoderOnion3, protoArgument, keyOpenArray, match, WebSockets_DNS, isEmpty, QUIC_V1_DNS, getField, selectBest, encode, Envelope, init, init, Reliable, addrs, init, getField, match, filterAddrs, CryptoError, append, init, parseFullAddress, generate, checkFutures, shuffle, validate, protoCode, pickOne, TranscoderP2P, sign, new, getBytes, encode, len, shortLog, writeField, getBytes, init, computeFieldSize, QUIC_IP, toChunks, protoArgument, readVarint, orError, MaInvalidAddress, writeField, getOrder, hash, TranscoderUnix, SignedPeerRecord, writeVarint, DNS_OR_IP, decode, random, MaError, decode, matchPartial, WS_DNS, initVBuffer, ==, ECDHEScheme, init, [], random, Secret, peekVarint, random, mapOr, bytes, publicRoutableAddressPolicy, maxInlineKeyLength, QUIC, withValue, mac, WS_IP, write, noPrivateAddressPolicy, libp2p_pki_schemes, areAddrsConsistent, init, HTTP, initVBuffer, TcpOnion3, write, update, toOpt, payloadType, $, IP, protoAddress, newRng, shortLog, checkValid, chroniclesFormatItIMPL, len, CircuitRelay, extractPublicKey, mapAnd, maErr, UDP_IP, init, ==, write, notifyObservers, QUIC_V1, TCP_IP, readSeq, capLen, protoName, toRawBytes, MaPattern, toException, init, match, writeLPVarint, CryptoResult, parseFullAddress, WebRTCDirect, init, UDP, init, >, decode, initVBuffer, decode, PKScheme, random, accepts, write, init, write, PeerInfoError, random, TranscoderIP4, toException, DNS, goffset, pick, init, high, toString, init, cmp, init, Signature, exclIfIt, removeObserver, supportsPacked, toBytes, DigestSheme, init, IPFS, getField, MultiAddress, shortLog, hex, protocols, UNIX, computeFieldSize, LPError, Rng, init, supportsPacked, toBytes, QUIC_V1_IP4, writeSeq, init, VBuffer, init, [], IP4, getField, init, withValue, readFieldInto, SignedPayload, toBytes, $, init, MAProtocol, contains, DNS4, readFieldInto, readArray, P2PPattern, hasPublicKey, isEnough, hex, write, toOpt, WS, init, encode, init, getField, <, iv, WSS_IP, peekArray, PeerRecord, SupportedSchemes, getField, hash, Unreliable, SupportedSchemesInt, random, macOpenArray, mapEq, Onion3, toFullAddress, concat, AddressInfo, defaultAddressPolicy, EnvelopeError, MaPatResult, take, init, write, write, UTP, verify, PublicKey, WebSockets_IP, writePBVarint, init, supportsPacked, ivOpenArray, RsaDefaultKeySize, generate, write, toOpt, toException, toException, checkFutures, LPError