Solved [QtModbusTCPServer] How we can get the IP address of the requestor for every Modbus request?
-
How we can get the IP address of the requestor for every Modbus request?
Is it possible?I have read the source code of the QtModbusTCPServer but I don't have any idea which part suppose to modified.
-
@kangherr https://doc.qt.io/qt-5/qabstractsocket.html#peerAddress
If you use https://doc.qt.io/qt-5/qmodbustcpserver.html#installConnectionObserver you get a QTcpSocket in https://doc.qt.io/qt-5/qmodbustcpconnectionobserver.html then you can use https://doc.qt.io/qt-5/qabstractsocket.html#peerAddress -
Oh Thanks, It's work.