Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to specfy the ip to connect the server

How to specfy the ip to connect the server

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 517 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.
  • A Offline
    A Offline
    aisha08
    wrote on last edited by aisha08
    #1

    there are two devices as servers by network lines connecting to my computer, and their IPs are the same(192.168.2.1), the port also the same(8501). I set the local IP address 192.168.2.100 and 192.168.101 each of them. I create a tcpSocekt ,but I don't know how to bind the local IP . it seems the "setLocalAddress()" will work, , Could anybody help me to solve the problem?

    jsulmJ 1 Reply Last reply
    0
    • A aisha08

      there are two devices as servers by network lines connecting to my computer, and their IPs are the same(192.168.2.1), the port also the same(8501). I set the local IP address 192.168.2.100 and 192.168.101 each of them. I create a tcpSocekt ,but I don't know how to bind the local IP . it seems the "setLocalAddress()" will work, , Could anybody help me to solve the problem?

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

      @aisha08 Two different devices in same network at the same time canNOT have same IP! Your devices are configured wrongly. Make sure they have different IPs.

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

      1 Reply Last reply
      2

      • Login

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