tcping icon indicating copy to clipboard operation
tcping copied to clipboard

Add flag for success

Open WilliamMiteff opened this issue 3 years ago • 0 comments

To code against this library without spawning subprocesses I have to reference internal variables to know if the connection was a success. Having a method to determine success would be helpful.

def do_ping(target, port = 80):
  ping = Ping(target, port)
  ping.ping(1)
  rc = (ping._successed > ping._failed)

WilliamMiteff avatar May 11 '21 19:05 WilliamMiteff