Frage

I want to listen to a well-known tcp port ,say 80 or 25 . How can I do this in Qt and using QTcpServer class? Or to be more generally, a port that is being used by someone else? Thanks in advance.

War es hilfreich?

Lösung

you can not open server on the port that someone else listens to unless they stop it. Ports below 1025 belong to privileged range and depending on your Os your program may have to elevated permissions

Well you can pick different network interface, but perhaps this is not what you are after

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top