Matthew Joseph wrote:instead of programming all the different ping responses, i just want to look for "192.168.1.6:" three times. if it can ping 3 times, it has a good enough connection to return TRUE
All things are lawful, but not all things are profitable.
I hope i didn't just muddy the waters even more. it didn't seem quite so convoluted until i typed it out!
All things are lawful, but not all things are profitable.
Personally I would have thought the way to do this was to look for the line "Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),"
Matthew Joseph wrote:
Personally I would have thought the way to do this was to look for the line "Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),"
Can't use it. whenever the destination host is unknown, it sends 4, receives 4, and loses 0-but the ip address sent back is the local machines.
So, I changed it around Knute. inLine is now a string. I concantenate the bf.readLine into it and then search for the ip. It works!
Originally, i was hoping to check the number of times it shows up, but even a single good ping will work for my purposes. The rest was just me
being anal. Thanks a lot!
Matthew Joseph wrote:well, im searching for the ip address with ":" at the end. the only time ping outputs the address like that is when it succeeds.
I'm still in control here. LOOK at this tiny ad!
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
|