Net module

PacketInfo

Provides information about packets emitted from a socket.

PacketInfo

#include <icy/net/socket.h>

Inherits: IPacketInfo

Provides information about packets emitted from a socket. See SocketPacket.

Public Attributes

ReturnNameDescription
Socket::PtrsocketThe source socket.
AddresspeerAddressThe originating peer address. For TCP this will always be connected address.

socket

Socket::Ptr socket

The source socket.


peerAddress

Address peerAddress

The originating peer address. For TCP this will always be connected address.

Public Methods

ReturnNameDescription
PacketInfo inlineConstructs PacketInfo with the originating socket and peer address.
PacketInfo inlineCopy constructor.
std::unique_ptr< IPacketInfo >clone virtual const inlineReturns a heap-allocated copy of this PacketInfo.

PacketInfo

inline

inline PacketInfo(const Socket::Ptr & socket, const Address & peerAddress)

Constructs PacketInfo with the originating socket and peer address.

Parameters

  • socket Shared pointer to the socket that received the packet.

  • peerAddress Address of the remote peer that sent the packet.


PacketInfo

inline

inline PacketInfo(const PacketInfo & r)

Copy constructor.

Parameters


clone

virtual const inline

virtual inline std::unique_ptr< IPacketInfo > clone() const

Returns a heap-allocated copy of this PacketInfo.