Simple ping application with two threads (client and server) communicating by sockets and exchanging ICMP messages.
The client side:
- encodes a object IcmpPacket in a vector of bytes and sends it by a socket;
- waits for a reply in the same socket;
- decodes the array of bytes received and displays the packet data;
The server side:
- waits for a ping request in a socket;
- decodes the array of bytes received and stores the data in a IcmpPacket object;
- encodes a IcmpPacket reply object and sends it by the same socket;