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