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. Qtcpserver
Forum Updated to NodeBB v4.3 + New Features

Qtcpserver

Scheduled Pinned Locked Moved Unsolved General and Desktop
9 Posts 3 Posters 683 Views 2 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.
  • S Offline
    S Offline
    satyanarayana143
    wrote on last edited by
    #1

    Qtcpserver set max connections but it not working how to limit connections Qtcpserver

    KroMignonK 1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi
      How do you know its not working ?
      Docs says
      "Clients may still able to connect after the server has reached its maximum number of pending connections (i.e., QTcpSocket can still emit the connected() signal). QTcpServer will stop accepting the new connections, but the operating system may still keep them in queue."

      So which part do you think is not working ?

      1 Reply Last reply
      0
      • S Offline
        S Offline
        satyanarayana143
        wrote on last edited by
        #3

        it should accept after maximum connections

        mrjjM 1 Reply Last reply
        0
        • S satyanarayana143

          it should accept after maximum connections

          mrjjM Offline
          mrjjM Offline
          mrjj
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @satyanarayana143
          Hi
          you mean Not accept ?

          1 Reply Last reply
          0
          • S Offline
            S Offline
            satyanarayana143
            wrote on last edited by
            #5

            yes should not accept

            mrjjM 1 Reply Last reply
            0
            • S satyanarayana143

              yes should not accept

              mrjjM Offline
              mrjjM Offline
              mrjj
              Lifetime Qt Champion
              wrote on last edited by
              #6

              @satyanarayana143

              Well it should not. As doc says.
              What Qt version are you using ?

              1 Reply Last reply
              0
              • S Offline
                S Offline
                satyanarayana143
                wrote on last edited by
                #7

                QT5.13.2

                1 Reply Last reply
                0
                • mrjjM Offline
                  mrjjM Offline
                  mrjj
                  Lifetime Qt Champion
                  wrote on last edited by
                  #8

                  Hi
                  I cant find any bug reports on that so I will assume it works as it should.

                  Maybe you expect something different. It limits incoming connections.

                  https://forum.qt.io/topic/8323/solved-qtcpserver-max-connection-limit

                  1 Reply Last reply
                  1
                  • S satyanarayana143

                    Qtcpserver set max connections but it not working how to limit connections Qtcpserver

                    KroMignonK Offline
                    KroMignonK Offline
                    KroMignon
                    wrote on last edited by
                    #9

                    @satyanarayana143 said in Qtcpserver:

                    Qtcpserver set max connections but it not working how to limit connections Qtcpserver

                    As far as I known, QTcpServer does only have setMaxPendingConnection(), I can't see setMaxConnection()...
                    This are the connection requests send by client sockets which are waiting to be processed. You don't have to accept them, they can be rejected!

                    The amount of established connection only depends on your implementation.

                    It is an old maxim of mine that when you have excluded the impossible, whatever remains, however improbable, must be the truth. (Sherlock Holmes)

                    1 Reply Last reply
                    4

                    • Login

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