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

Methods

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

Exports

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