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. Client/Server with a lot of connections
Forum Updated to NodeBB v4.3 + New Features

Client/Server with a lot of connections

Scheduled Pinned Locked Moved General and Desktop
socket
4 Posts 3 Posters 1.4k 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.
  • A Offline
    A Offline
    Alux
    wrote on last edited by
    #1

    Dear ALL users
    I am new to this forum and hope that could find out any solution about my problem

    I wrote a Client/Server application that works like messengers programs

    Each client make tcp socket connection to the server and send their data.

    My program works find with my test environment that consist of 15 clients

    The problem occurs when client connection increase and it seems that my server misses some of them

    For example when I try to send packet from different client ( 100 Client ) to my server , server shows that only 90 client connected and 10 client is not connected,

    Another issues is that a server maybe loss packet from client that make a lot of connections to servers

    Is there any idea about this issues? Any point that I should considered?

    Thanks for your attentions

    1 Reply Last reply
    0
    • mrdebugM Offline
      mrdebugM Offline
      mrdebug
      wrote on last edited by
      #2

      Sorry but this question is too generic. Are you using event ot thread approach?

      Need programmers to hire?
      www.labcsp.com
      www.denisgottardello.it
      GMT+1
      Skype: mrdebug

      A 1 Reply Last reply
      0
      • mrdebugM mrdebug

        Sorry but this question is too generic. Are you using event ot thread approach?

        A Offline
        A Offline
        Alux
        wrote on last edited by
        #3

        @mrdebug

        Yes, i'm using thread

        im using qtcpsocket ( Listener as server )

        when a connection socket received from client, server received client data

        a part of my code is

        void NetworkManager::incomingConnection(int socketfd)
        {
        QTcpSocket *client = new QTcpSocket(this);
        client->setSocketDescriptor(socketfd);
        clients.insert(client);
        qDebug() « "new connection from new client";
        client->peerAddress().toString());
        connect(client, SIGNAL(readyRead()), this, SLOT(readyRead()));
        connect(client, SIGNAL(disconnected()), this, SLOT(disconnected()));
        }

        1 Reply Last reply
        0
        • A Offline
          A Offline
          AlexRoot
          wrote on last edited by
          #4

          We would need the whole implementation and debug it. But I guess it would be more productive when you watch some tutorial about high performance TCP server designs and stuff. This is a nice tutorial I can recommend: https://www.youtube.com/watch?v=zMgbVN3uQ-E

          Cheers

          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