libp2p/transports/memorytransport

    Dark Mode
Search:
Group by:
  Source   Edit

Memory transport implementation

Types

MemoryTransport = ref object of Transport
  rng: ref HmacDrbgContext
  connections: seq[Connection]
  listener: Opt[MemoryListener]
  Source   Edit

Consts

MemoryAutoAddress = "/memory/*"
  Source   Edit

Procs

proc dial(self: MemoryTransport; ma: MultiAddress;
          peerId: Opt[PeerId] = Opt.none(PeerId)): Future[Connection] {....gcsafe,
    raises: [], tags: [RootEffect].}
  Source   Edit
proc new(T: typedesc[MemoryTransport]; upgrade: Upgrade = Upgrade();
         rng: ref HmacDrbgContext = newRng()): T:type
  Source   Edit

Methods

method accept(self: MemoryTransport): InternalRaisesFuture[Connection,
    (TransportError, CancelledError)] {.stackTrace: false, ...raises: [], gcsafe,
                                        tags: [RootEffect].}
  Source   Edit
method dial(self: MemoryTransport; hostname: string; ma: MultiAddress;
            peerId: Opt[PeerId] = Opt.none(PeerId)): InternalRaisesFuture[
    Connection, (TransportError, CancelledError)] {.stackTrace: false,
    ...raises: [], gcsafe, tags: [RootEffect].}
  Source   Edit
method handles(self: MemoryTransport; ma: MultiAddress): bool {....gcsafe,
    raises: [], tags: [].}
  Source   Edit
method start(self: MemoryTransport; addrs: seq[MultiAddress]): InternalRaisesFuture[
    void, (LPError, TransportError)] {.stackTrace: false, ...raises: [], gcsafe,
                                       tags: [RootEffect].}
  Source   Edit
method stop(self: MemoryTransport): InternalRaisesFuture[void, void] {.
    stackTrace: false, ...raises: [], gcsafe, tags: [RootEffect].}
  Source   Edit

Exports

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