ex_wire v0.1.1 ExWire.Packet.Pong

Pong is the response to a Ping message.

**Pong** `0x03` []

Reply to peer's `Ping` packet.

Link to this section Summary

Functions

Given an RLP-encoded Pong packet from Eth Wire Protocol, decodes into a Pong struct

Handles a Pong message. We should track the round-trip time since the corresponding Ping was sent to know how fast this peer is

Given a Pong packet, serializes for transport over Eth Wire Protocol

Link to this section Types

Link to this type t()
t() :: %ExWire.Packet.Pong{}

Link to this section Functions

Link to this function deserialize(rlp)
deserialize(ExRLP.t) :: t

Given an RLP-encoded Pong packet from Eth Wire Protocol, decodes into a Pong struct.

Examples

iex> ExWire.Packet.Pong.deserialize([])
%ExWire.Packet.Pong{}

Handles a Pong message. We should track the round-trip time since the corresponding Ping was sent to know how fast this peer is.

Examples

iex> ExWire.Packet.Pong.handle(%ExWire.Packet.Pong{})
:ok
Link to this function serialize(packet)
serialize(t) :: ExRLP.t

Given a Pong packet, serializes for transport over Eth Wire Protocol.

Examples

iex> %ExWire.Packet.Pong{}
...> |> ExWire.Packet.Pong.serialize
[]