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: [Defect].}
- 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] {....gcsafe, public(), stackTrace: false, ...gcsafe, raises: [], raises: [], tags: [RootEffect].}
- Sends ping to conn, returns the delay Source Edit
Exports
-
newLPStreamWriteError, getProtoHeader, shortLog, random, $, MaError, ephemeral, MaPatternOp, HTTP, initVBuffer, getProtoHeader, MaxSizeError, ProtoHeader, ==, getLen, ECDHEScheme, shortLog, init, closed, [], shuffle, random, init, Secret, peekVarint, random, $, validate, mapOr, init, maxInlineKeyLength, TranscoderDNS, QUIC, [], ephemeral, getRequiredField, getField, readVarint, writeLp, getWrapped, write, public, MAKind, decode, newLPStreamIncorrectDefect, write, init, getField, checkFieldNumber, init, getRepeatedField, matchPartial, getBytes, len, ==, init, readLp, initVBuffer, atEof, peekSeq, payloadType, <=, LPStreamError, decode, IP, protoAddress, newRng, DefaultConnectionTimeout, checkValid, getPublicKey, decodeProposal, len, CircuitRelay, extractPublicKey, mapAnd, new, verify, new, newLPStreamEOFError, init, ==, DNSADDR, hash, 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, init, finish, LPStreamResetError, isEmpty, writeArray, LPStreamReadError, LPStreamIncompleteError, PeerId, LPStreamEOFError, IP6, shortLog, initVBuffer, ProtoFlags, PKScheme, isUpgraded, payload, Connection, write, init, TCP, PrivateKey, getBytes, write, init, &=, PeerInfoError, hash, newLPStreamClosedError, close, init, initProtoBuffer, toException, DNS, init, upgrade, UTP, goffset, getRawBytes, >, KeyPair, TimeoutHandler, high, toString, cmp, init, SupportedWireTypes, formatItIMPL, formatItIMPL, formatItIMPL, Signature, formatItIMPL, toBytes, DigestSheme, IPFS, readOnce, isEmpty, MultiAddress, ProtoScalar, shortLog, LPStreamIncorrectDefect, hex, protocols, HTTPS, tryAndWarn, len, LPError, getPtr, write, sign, encode, update, MaResult, init, ProtoField, toBytes, writeSeq, &, DNS6, IpTransportProtocol, toOpenArray, allFuturesThrowing, IP4, TranscoderPort, isEnough, getBytes, getField, DNSANY, createExchange, >=, init, mac, payloadDomain, $, init, LPStreamLimitError, libp2p_pki_schemes, TranscoderOnion3, SignedPayload, init, toBytes, protoArgument, newLPStreamLimitError, write, keyOpenArray, init, match, $, isEmpty, supported, getRequiredRepeatedField, newLPStreamIncompleteError, newLPStreamReadError, initProtoBuffer, MAProtocol, newLPStreamResetError, getPackedRepeatedField, initStream, contains, shortLog, DNS4, readArray, selectBest, write, P2PPattern, Envelope, hasPublicKey, toException, init, isEnough, init, Reliable, hex, ProtoBuffer, closeImpl, write, WS, stretchKeys, encode, init, init, getField, match, getField, <, iv, onUpgrade, readLine, Eof, CryptoError, getField, 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, Onion3, write, TcpOnion3, concat, TranscoderP2P, PeerInfo, AddressInfo, ConnectionTrackerName, TranscoderIP6, init, write, EnvelopeError, encode, WebSockets, newLPStreamRemoteClosedError, createProposal, MaPatResult, Direction, key, InvalidVarintError, decode, shortLog, ==, init, write, getBytes, write, init, finish, init, readVarint, PublicKey, VBuffer, writeLp, writePBVarint, ProtoFieldKind, readExactly, protoArgument, getRepeatedField, shcopy, ProtoError, newLPStreamConnDownError, init, initStream, getField, ivOpenArray, closeWithEOF, LPStreamTrackerName, orError, decodeExchange, getField, LPStreamRemoteClosedError, setupStreamTracker, MaInvalidAddress, LPStreamClosedError, items, write, getOrder, [], TranscoderUnix, SignedPeerRecord, join, writeVarint