Using C ++, to get the latency time by pinging the host to use in my program I want to use command / class. I tried to use the ping command but there was no easy way to gather at that time because it contained other statistical information. I was expecting an easy approach.
The device is usually implemented in C and works by sending packets A,. The time of the system is recorded - usually from the bottom - when the echo request is made and then when someone (if any) is received to determine the goal-trip time, you can get the same in your C ++ application You can keep using the functionality.
Otherwise, removing information from a ping system call may be easier than you think. The key is to allow one to read the ping command (see or). A (eg "time = [[0-9] *)" can be used to exclude the desired data. If you do not have a regex library available, then only a small string manipulation is needed to remove this data. Provides many algorithms that can be used.
Comments
Post a Comment