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