Einzelnen Beitrag anzeigen

Kas Ob.

Registriert seit: 3. Sep 2023
412 Beiträge
 
#60

AW: schnelle Server Client Verbindung ohne Verluste

  Alt 8. Apr 2025, 14:43
Ich muss gestehen, der Umgangston lässt leider nach.

Ich habe in procedure TForm1.Log(aStr : String); UND procedure TForm1.UpdateTimerTimer(Sender: TObject); jeweils ein Exit an erster Stelle eingebaut. Trotzdem wird der Write-Aufruf nur genau 5x durchlaufen und beim 6ten Mal hängt dieser. Es hat nichts mit der VCL zu tun und ich würde mich über einen netteren Umgangston wieder freuen

Edit:
Am besten mal hier ein Breakpoint machen und gucken, wie oft er rein kommt obwohl die Liste 100 Einträge hat

Data.Context.Connection.IOHandler.WriteDirect(Data.Daten);
Tariff it is !

Seriously, using or lets rephrase it, touching VCL of any kind is wrong, so Log method should be somewhere else not in any kind of TForm, also running the code a see the server is sending fine !

The problem is client is not receiving, it is not performing a real read over socket, the buffer is client side, and here i mean the TCP socket receiving buffer is full, and that after window sliding, hence an ACK is not received by server to continue sending (send over socket), at low level you poll the state of the socket and send only if the socket sate is ready to send, this is not happening on server side, due the accumulation of the data on client side.
That is the server write/send problem with above code.

in other words you must ensure to empty the buffer as soon as possible.
Kas
  Mit Zitat antworten Zitat