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