Skip to content

Run ping with custom data size #1912

@dk1301

Description

@dk1301

Hi all,
I have used the ping example for cross-platform ping measurement. In addition I'd like to run ping with custom data size and not the 48 default size byte.
In ICMPClient class there is no relevant constructor and the ICMPSocket has the specific one

ICMPSocket(
    IPAddress::Family family,
    int dataSize = 48,
    int ttl = 128,
    int timeout = 500000
);

So far the only way I'm seeing is to create new classes that will inherit ICMPClient and ICMPSocket in order to handle the extra argument of datasize.
Apart from the above approach is there another way to accomplish that I'm missing ?

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions