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 reconnect udp socket from 1 ip address to another address
Forum Updated to NodeBB v4.3 + New Features

how to reconnect udp socket from 1 ip address to another address

Scheduled Pinned Locked Moved Solved General and Desktop
3 Posts 2 Posters 365 Views 1 Watching
  • 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.
  • V Offline
    V Offline
    Vijaykarthikeyan
    wrote on last edited by
    #1

    I currently have a udp socket which is connected to the local host. The question is that. If I want to connect the same socket to another ip address,i have to close the current address and port. How to disconnect the socket from current ip address and reconnect to the new ip address

    Pl45m4P 1 Reply Last reply
    0
    • V Vijaykarthikeyan

      I currently have a udp socket which is connected to the local host. The question is that. If I want to connect the same socket to another ip address,i have to close the current address and port. How to disconnect the socket from current ip address and reconnect to the new ip address

      Pl45m4P Offline
      Pl45m4P Offline
      Pl45m4
      wrote on last edited by
      #2

      @Vijaykarthikeyan

      • https://doc.qt.io/qt-6/qabstractsocket.html#disconnectFromHost

      or

      • https://doc.qt.io/qt-6/qabstractsocket.html#close

      and then connect to the new address + port


      If debugging is the process of removing software bugs, then programming must be the process of putting them in.

      ~E. W. Dijkstra

      V 1 Reply Last reply
      2
      • Pl45m4P Pl45m4

        @Vijaykarthikeyan

        • https://doc.qt.io/qt-6/qabstractsocket.html#disconnectFromHost

        or

        • https://doc.qt.io/qt-6/qabstractsocket.html#close

        and then connect to the new address + port

        V Offline
        V Offline
        Vijaykarthikeyan
        wrote on last edited by
        #3

        @Pl45m4 thank you

        1 Reply Last reply
        0
        • V Vijaykarthikeyan has marked this topic as solved on

        • Login

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