libp2p/protocols/ping

    Dark Mode
Search:
Group by:
  Source   Edit

Ping protocol implementation

Types

Ping = ref object of LPProtocol
  pingHandler*: PingHandler
  rng: ref HmacDrbgContext
  Source   Edit
PingError = object of LPError
  Source   Edit
PingHandler {.public.} = proc (peer: PeerId): Future[void] {....gcsafe,
    raises: [Defect].}
  Source   Edit
WrongPingAckError = object of PingError
  Source   Edit

Consts

PingCodec = "/ipfs/ping/1.0.0"
  Source   Edit

Procs

proc new(T: typedesc[Ping]; handler: PingHandler = nil;
         rng: ref HmacDrbgContext = newRng()): T:type {.public, ...raises: [Defect].}
  Source   Edit
proc ping(p: Ping; conn: Connection): Future[Duration] {....gcsafe, public(),
    stackTrace: false, ...gcsafe, raises: [Defect], raises: [Defect],
    tags: [RootEffect].}
Sends ping to conn, returns the delay   Source   Edit

Methods

method init(p: Ping) {....raises: [Defect], tags: [].}
  Source   Edit

Exports

newLPStreamWriteError, getProtoHeader, shortLog, random, $, MaError, ephemeral, MaPatternOp, HTTP, initVBuffer, getProtoHeader, MaxSizeError, ProtoHeader, ==, getLen, ECDHEScheme, shortLog, init, closed, [], decode, shcopy, shuffle, random, init, VBuffer, Secret, peekVarint, random, $, validate, mapOr, maxInlineKeyLength, TranscoderDNS, QUIC, init, ephemeral, getRequiredField, getField, supported, write, public, MAKind, getBytes, write, init, getField, checkFieldNumber, init, getRepeatedField, matchPartial, getBytes, len, init, readLp, init, initVBuffer, atEof, LPStreamTrackerName, peekSeq, payloadType, <=, LPStreamError, init, IP, protoAddress, decode, newRng, DefaultConnectionTimeout, checkValid, getPublicKey, decodeProposal, WebSockets, CircuitRelay, extractPublicKey, mapAnd, new, hash, new, newLPStreamEOFError, init, ==, DNSADDR, hash, init, write, WSS, LPStream, writePacked, init, closeImpl, readSeq, toBytes, shortLog, encode, TranscoderIP4, protoName, ==, toRawBytes, TranscoderIP6Zone, $, initProtoBuffer, newLPStreamReadError, init, match, writeLPVarint, CryptoResult, decode, ProtoResult, WebRTCDirect, init, init, UDP, PeerInfo, TranscoderOnion, StreamTracker, write, init, readVarint, isEmpty, writeArray, writeLp, LPStreamIncompleteError, PeerId, [], LPStreamEOFError, IP6, shortLog, initVBuffer, ProtoFlags, PKScheme, isUpgraded, payload, stretchKeys, Connection, write, TCP, PrivateKey, getBytes, write, init, &=, PeerInfoError, newLPStreamClosedError, close, init, initProtoBuffer, toException, DNS, init, init, upgrade, goffset, finish, getRawBytes, >, KeyPair, TimeoutHandler, init, high, toString, cmp, init, SupportedWireTypes, formatItIMPL, formatItIMPL, formatItIMPL, Signature, formatItIMPL, toBytes, DigestSheme, IPFS, readOnce, isEmpty, MultiAddress, ProtoScalar, shortLog, LPStreamIncorrectDefect, hex, protocols, init, HTTPS, tryAndWarn, LPError, getPtr, write, sign, encode, update, MaResult, init, ProtoField, toBytes, writeSeq, &, DNS6, IpTransportProtocol, toOpenArray, init, allFuturesThrowing, IP4, TranscoderPort, isEnough, write, getField, DNSANY, createExchange, >=, init, mac, payloadDomain, $, init, LPStreamLimitError, libp2p_pki_schemes, SignedPayload, init, toBytes, newLPStreamLimitError, write, keyOpenArray, init, match, $, isEmpty, LPStreamReadError, getRequiredRepeatedField, newLPStreamIncompleteError, newLPStreamReadError, initProtoBuffer, MAProtocol, getPackedRepeatedField, initStream, contains, init, shortLog, DNS4, readArray, selectBest, newLPStreamIncorrectDefect, P2PPattern, Envelope, hasPublicKey, toException, init, isEnough, Reliable, hex, ProtoBuffer, closeImpl, write, WS, readVarint, encode, init, getField, match, getField, <, iv, onUpgrade, readLine, Eof, CryptoError, getField, append, MaPattern, vsizeof, init, peekArray, UNIX, PeerRecord, SupportedSchemes, getRepeatedField, LPStreamWriteError, getField, RsaDefaultKeySize, hash, Unreliable, SupportedSchemesInt, random, checkFutures, macOpenArray, init, validate, $, protoCode, mapEq, getField, concat, TranscoderP2P, AddressInfo, ConnectionTrackerName, TranscoderIP6, init, write, EnvelopeError, encode, len, MaxMessageSize, createProposal, MaPatResult, Direction, key, InvalidVarintError, shortLog, ==, write, getBytes, write, UTP, finish, verify, PublicKey, writeLp, writePBVarint, ProtoFieldKind, readExactly, protoArgument, getRepeatedField, ProtoError, init, initStream, getField, ivOpenArray, closeWithEOF, orError, decodeExchange, getField, MaInvalidAddress, LPStreamClosedError, writeVarint, items, write, getOrder, TranscoderUnix, SignedPeerRecord, join