[Interest] TCP window scale

Yauheni Pervenenka yauheni.pervenenka at viber.com
Tue May 23 21:28:43 CEST 2023


Thiago, thanks but I am not sure that there is any problem on sender side
it is simple test tcp client
#include <QCoreApplication>
#include <QTcpSocket>

int main(int argc, char *argv[])
{
    QCoreApplication a(argc, argv);
    QTcpSocket tcpSocket;
    const auto writeToSocket = [&](){
        const auto written = tcpSocket.write(QByteArray(8192, '1'));
        qDebug() << "Sending " << written << " bytes";
    };
    QObject::connect(&tcpSocket, &QAbstractSocket::connected, &tcpSocket,
[&](){
        qDebug() << "Client connected!";
        writeToSocket();
    });
    QObject::connect(&tcpSocket, &QIODevice::bytesWritten,
                     &tcpSocket, [&](auto bytes){
        qDebug() << "Bytes written = " << bytes;
        writeToSocket();
    });
    QObject::connect(&tcpSocket, &QAbstractSocket::errorOccurred,
                     &tcpSocket, [](auto error){
        qDebug() << "Error " << error;
    });
    tcpSocket.connectToHost(QHostAddress::LocalHost, 55666);
    return a.exec();
}



On Tue, May 23, 2023 at 10:21 PM Thiago Macieira <thiago.macieira at intel.com>
wrote:

> On Tuesday, 23 May 2023 10:37:19 PDT Yauheni Pervenenka via Interest wrote:
> > In more details I need to get correct progress from my localhost tcp
> > server, I mean to get progress when tcp server read data from socket, but
> > now I can write 8MB using QTCPSocket to server but server read nothing
> from
> > socket and system ack's every 8192 message
>
> That's not sufficient information.
>
> I actually doubt that what you're asking for will accomplish what you
> want.
> It's very likely you have mis-diagnosed the problem and are therefore
> asking
> for something completely irrelevant.
>
> Very likely, the problem is in your sender, somewhere where you're not
> looking. Make sure the event loop is running in the thread that is writing
> that 8 MB.
>
> --
> Thiago Macieira - thiago.macieira (AT) intel.com
>   Cloud Software Architect - Intel DCAI Cloud Engineering
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> https://lists.qt-project.org/listinfo/interest
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20230523/02a1e25f/attachment.htm>


More information about the Interest mailing list