Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Get outgoing connections of an QProcess



  • Hey,

    I want to get the outgoing connections of an QProcess (or PID). I have heard something about netstat but I don't want to use a command line tool (only if there is no other way). Is there an way to solve this using Qt? Or do I need an 3rd Party library? Hope anyone can help.

    ~ jan


  • Moderators

    AFAIK there is not. Not unless the process you are spawning writes information like that out to stdout. Then you can read that and parse it.

    I have used a QProcess for running pppd and it outputs information about connections so I was able to parse that output for the info I need.

    But QProcess itself doesn't have any way of detecting what connections the process is making.


Log in to reply