libp2p/stream/connection

    Dark Mode
Search:
Group by:
  Source   Edit

Types

Connection = ref object of LPStream
  activity*: bool
  timeout*: Duration
  timerTaskFut: Future[void].Raising([])
  timeoutHandler*: TimeoutHandler
  peerId*: PeerId
  observedAddr*: Opt[MultiAddress]
  protocol*: string
  transportDir*: Direction
  when defined(libp2p_agents_metrics):
      shortAgent*: string

  
  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: [].}
  Source   Edit
proc new(C: type Connection; peerId: PeerId; dir: Direction;
         observedAddr: Opt[MultiAddress];
         timeout: Duration = DefaultConnectionTimeout;
         timeoutHandler: TimeoutHandler = nil): Connection {....raises: [].}
  Source   Edit
func shortLog(conn: Connection): string {....raises: [], tags: [].}
  Source   Edit

Methods

method closeImpl(s: Connection): InternalRaisesFuture[void, void] {.
    stackTrace: false, ...raises: [], gcsafe, raises: [], raises: [],
    tags: [RootEffect].}
  Source   Edit
method getWrapped(s: Connection): Connection {.base, ...raises: [], tags: [].}
  Source   Edit
method initStream(s: Connection) {....raises: [], tags: [TimeEffect, RootEffect].}
  Source   Edit

Templates

template formatItIMPL(it: Connection): auto
  Source   Edit

Exports

InvalidVarintError, atEof, newLPStreamIncompleteError, writeLp, initStream, formatItIMPL, newLPStreamResetError, readVarint, LPStreamError, closeWithEOF, newLPStreamLimitError, join, LPStreamResetError, write, Eof, newLPStreamClosedError, LPStreamIncompleteError, close, LPStreamRemoteClosedError, readLp, LPStreamEOFError, LPStreamTrackerName, shortLog, LPStreamConnDownError, LPStreamLimitError, readOnce, toException, toException, LPStream, LPStreamClosedError, newLPStreamEOFError, StreamTracker, MaxSizeError, write, closeImpl, writeLp, newLPStreamRemoteClosedError, checkFutures, readLine, Direction, readExactly, newLPStreamConnDownError, closed, LPError, shortLog, UDP_DNS, ephemeral, init, MaPatternOp, <=, shortLog, init, $, validate, hash, init, TLS_WS, TranscoderDNS, init, ephemeral, getField, MAKind, getField, checkFieldNumber, init, getRepeatedField, getBytes, len, &, finish, peekSeq, fullAddrs, getProtoHeader, init, withValue, getPublicKey, exceptionToAssert, new, DNSANY, DNSADDR, AddressMapper, WSS, init, toBytes, TCP_DNS, shortLog, encode, len, supported, ==, $, WSS_DNS, <, $, PeerInfo, TranscoderOnion, write, key, writeArray, PeerId, IP6, shortLog, payload, init, TCP, PrivateKey, getBytes, init, &=, init, $, getRawBytes, KeyPair, update, SupportedWireTypes, hash, init, DNS4, isEmpty, ProtoScalar, data, HTTPS, TranscoderIP6, encode, MaResult, DNS6, [], IpTransportProtocol, toOpenArray, TranscoderPort, isEnough, write, >=, init, payloadDomain, $, MaPattern, init, TranscoderOnion3, protoArgument, write, keyOpenArray, match, WebSockets_DNS, isEmpty, getRequiredRepeatedField, initProtoBuffer, init, getField, selectBest, getPtr, Envelope, init, init, Reliable, addrs, init, match, getField, CryptoError, append, vsizeof, init, parseFullAddress, getRepeatedField, checkFutures, shuffle, validate, protoCode, getField, TranscoderP2P, sign, getBytes, encode, len, TranscoderIP6Zone, shortLog, items, getBytes, init, ProtoFieldKind, protoArgument, getField, readVarint, orError, MaInvalidAddress, writeVarint, getOrder, TranscoderUnix, SignedPeerRecord, DNS_OR_IP, decode, random, getProtoHeader, MaError, finish, decode, matchPartial, WS_DNS, initVBuffer, ProtoFlags, ==, getLen, ECDHEScheme, init, [], random, Secret, peekVarint, random, mapOr, bytes, maxInlineKeyLength, QUIC, withValue, getRequiredField, mac, WS_IP, public, write, valueOr, HTTP, initVBuffer, TcpOnion3, write, toOpt, payloadType, ProtoHeader, $, IP, protoAddress, newRng, checkValid, WebSockets, CircuitRelay, extractPublicKey, mapAnd, UDP_IP, ==, write, TCP_IP, writePacked, readSeq, capLen, protoName, toRawBytes, initProtoBuffer, toException, init, match, writeLPVarint, CryptoResult, parseFullAddress, ProtoResult, WebRTCDirect, init, UDP, init, isEmpty, decode, initVBuffer, PKScheme, random, write, init, write, PeerInfoError, compilesOr, TranscoderIP4, initProtoBuffer, toException, DNS, goffset, >, init, high, toString, init, cmp, formatItIMPL, formatItIMPL, Signature, exclIfIt, toBytes, DigestSheme, IPFS, MultiAddress, hex, protocols, init, UNIX, init, ProtoField, toBytes, writeSeq, stretchKeys, ==, [], IP4, safeConvert, getField, init, withValue, SignedPayload, toBytes, init, MAProtocol, getPackedRepeatedField, contains, libp2p_pki_schemes, readArray, P2PPattern, hasPublicKey, isEnough, hex, write, WS, encode, init, getField, iv, getField, WSS_IP, peekArray, PeerRecord, SupportedSchemes, Unreliable, SupportedSchemesInt, random, LPError, macOpenArray, mapEq, Onion3, concat, AddressInfo, init, write, EnvelopeError, MaPatResult, ProtoBuffer, init, init, write, write, UTP, verify, init, PublicKey, WebSockets_IP, VBuffer, writePBVarint, getRepeatedField, ProtoError, init, ivOpenArray, RsaDefaultKeySize, getField, write, toException, toException, checkFutures, LPError