Poco::Net

class ICMPSocketImpl

Library: Net
Package: ICMP
Header: Poco/Net/ICMPSocketImpl.h

Description

This class implements an ICMP socket.

Inheritance

Direct Base Classes: RawSocketImpl

All Base Classes: RawSocketImpl, SocketImpl, Poco::RefCountedObject

Member Summary

Member Functions: dataSize, packetSize, receiveFrom, sendTo, timeout, ttl

Inherited Functions: acceptConnection, address, available, bind, bind6, checkBrokenTimeout, close, connect, connectNB, duplicate, error, fcntl, getBlocking, getBroadcast, getError, getKeepAlive, getLinger, getNoDelay, getOOBInline, getOption, getRawOption, getReceiveBufferSize, getReceiveTimeout, getReuseAddress, getReusePort, getSendBufferSize, getSendTimeout, init, init2, initSocket, initialized, ioctl, lastError, listen, peerAddress, poll, receiveBytes, receiveFrom, referenceCount, release, reset, secure, sendBytes, sendFile, sendTo, sendUrgent, setBlocking, setBroadcast, setKeepAlive, setLinger, setNoDelay, setOOBInline, setOption, setRawOption, setReceiveBufferSize, setReceiveTimeout, setReuseAddress, setReusePort, setSendBufferSize, setSendTimeout, shutdown, shutdownReceive, shutdownSend, socketError, sockfd, type, useFileDescriptor

Constructors

ICMPSocketImpl

ICMPSocketImpl(
    SocketAddress::Family family,
    int dataSize,
    int ttl,
    int timeout
);

Creates an unconnected ICMP socket.

The socket will be created for the given address family.

Destructor

~ICMPSocketImpl protected virtual

~ICMPSocketImpl();

Member Functions

dataSize inline

int dataSize() const;

Returns the data size in bytes.

packetSize inline

int packetSize() const;

Returns the packet size in bytes.

receiveFrom

int receiveFrom(
    void * param391,
    int,
    SocketAddress & address,
    int flags = 0
);

Receives data from the socket. Stores the address of the sender in address.

Returns the time elapsed since the originating request was sent.

sendTo

int sendTo(
    const void * param390,
    int,
    const SocketAddress & address,
    int flags = 0
);

Sends an ICMP request through the socket to the given address.

Returns the number of bytes sent.

timeout inline

int timeout() const;

Returns the socket timeout value.

ttl inline

int ttl() const;

Returns the Time-To-Live value.