Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. [QtModbusTCPServer] How we can get the IP address of the requestor for every Modbus request?
Forum Updated to NodeBB v4.3 + New Features

[QtModbusTCPServer] How we can get the IP address of the requestor for every Modbus request?

Scheduled Pinned Locked Moved Solved Mobile and Embedded
3 Posts 2 Posters 506 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    kangherr
    wrote on last edited by kangherr
    #1

    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.

    jsulmJ 1 Reply Last reply
    0
    • K kangherr

      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.

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @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

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      1
      • K Offline
        K Offline
        kangherr
        wrote on last edited by
        #3

        Oh Thanks, It's work.

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved