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. Setting the server port[solved]
Servers for Qt installer are currently down

Setting the server port[solved]

Scheduled Pinned Locked Moved Mobile and Embedded
10 Posts 4 Posters 6.9k 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.
  • P Offline
    P Offline
    preeth
    wrote on 27 Feb 2013, 09:27 last edited by
    #1

    hello every one..
    My application needs the communication between server and client application ,
    but every time when i launch server side program the port get changes.
    can anybody tell how to set the port

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 27 Feb 2013, 09:39 last edited by
      #2

      Hi,

      If you are using QTcpServer, set the port when you call listen.

      Hope it helps

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • P Offline
        P Offline
        preeth
        wrote on 27 Feb 2013, 09:57 last edited by
        #3

        @SGaist:
        thanks
        yes,we are using TcpServer. If you provide the code snippet it would be of great help..

        1 Reply Last reply
        0
        • K Offline
          K Offline
          KA51O
          wrote on 27 Feb 2013, 09:58 last edited by
          #4

          Look at the "docs":http://qt-project.org/doc/qt-4.8/qtcpserver.html#listen.

          1 Reply Last reply
          0
          • Q Offline
            Q Offline
            qxoz
            wrote on 27 Feb 2013, 10:44 last edited by
            #5

            And examples: "network":http://qt-project.org/doc/qt-5.0/qtnetwork/examples-network.html

            1 Reply Last reply
            0
            • P Offline
              P Offline
              preeth
              wrote on 17 Mar 2013, 14:09 last edited by
              #6

              problem solved.. thanks everyone :) :)

              1 Reply Last reply
              0
              • S Offline
                S Offline
                SGaist
                Lifetime Qt Champion
                wrote on 18 Mar 2013, 21:59 last edited by
                #7

                You're welcome :)

                Please, update the thread title to solved so other people on the forum knows when searching

                Interested in AI ? www.idiap.ch
                Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                1 Reply Last reply
                0
                • P Offline
                  P Offline
                  preeth
                  wrote on 20 Mar 2013, 03:03 last edited by
                  #8

                  tcpServer->listen(QHostAddress::Any,portnumber);

                  1 Reply Last reply
                  0
                  • Q Offline
                    Q Offline
                    qxoz
                    wrote on 20 Mar 2013, 04:05 last edited by
                    #9

                    [quote author="preeth" date="1363748622"]tcpServer->listen(QHostAddress::Any,portnumber);[/quote]
                    SGaist mean edit a title of first post and add to it "[solved]" :)

                    1 Reply Last reply
                    0
                    • P Offline
                      P Offline
                      preeth
                      wrote on 20 Mar 2013, 04:13 last edited by
                      #10

                      edited :)

                      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