0

Specifically for the VoIP Software Mumble.

I have a fairly choppy connection to my frequented server and when it breaks I'd like to update a data file with various statistics at the time. I have all the code worked out for the statistics gathering, however I am not sure how to have this code trigger when the connection itself breaks. I've given psutil a go but could not find any connections from Mumble listed under the output.

Is there any kind of Python library that would allow me to monitor a programs active connection to a server and take action when it detects it has been broken?

martineau
  • 119,623
  • 25
  • 170
  • 301
DatDude
  • 1
  • 1
  • You could check for the `http` status. Maybe something like `ping` – kmario23 Apr 02 '17 at 16:03
  • 1
    If you are simply looking for a library, this question is off-topic. If you are trying to program a solution, you will need to provide more details. As an example, what OS are you using. Also, why is this tagged python 2 and 3? – Stephen Rauch Apr 02 '17 at 16:37
  • Possible duplicate of [c++ - Detecting TCP Client Disconnect](http://stackoverflow.com/questions/283375/detecting-tcp-client-disconnect) – ivan_pozdeev Apr 02 '17 at 17:10
  • Its common for voip to use UDP, not TCP and that would make it more difficult to detect. I don't know what mumble uses, but it would be worth a peek. You could monitor the network interface itself... `udevmon monitor` gives you running status of what's going on. – tdelaney Apr 02 '17 at 19:11

0 Answers0