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: receiveFrom, sendTo

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

Constructors

ICMPSocketImpl

ICMPSocketImpl(
    IPAddress::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

receiveFrom

int receiveFrom(
    void * param270,
    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 * param269,
    int,
    const SocketAddress & address,
    int flags = 0
);

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

Returns the number of bytes sent.