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: [].}
  Source   Edit
proc ping(p: Ping; conn: Connection): Future[Duration] {....gcsafe, public(),
    stackTrace: false, ...gcsafe, raises: [], raises: [], tags: [RootEffect].}
Sends ping to conn, returns the delay   Source   Edit

Methods

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

Exports

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