Watch, Follow, &
Connect with Us

Please visit our new home
community.embarcadero.com.


Welcome, Guest
Guest Settings
Help

Thread: indy tcp client and server


This question is not answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 2 - Last Post: Oct 23, 2017 9:57 AM Last Post By: Remy Lebeau (Te...
madammar ellias

Posts: 111
Registered: 8/17/17
indy tcp client and server  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 21, 2017 5:04 PM
i am running tcp client and server with a few clients , clients with good internet connection don't face any disconnection problems and there client side work smoothly, now the clients with poor connections very slow internet speed connect normally but while send and receive after short time they got socket exception
EIdSocketError with message Socket Error # 10054
Connection reset by peer.


there internet isn't actuality disconnected but they only get this socket error .

what could be the case ? is there some settings needs to be applied for slow internet clients ?
madammar ellias

Posts: 111
Registered: 8/17/17
Re: indy tcp client and server  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 22, 2017 8:02 PM   in response to: madammar ellias in response to: madammar ellias
madammar ellias wrote:
i am running tcp client and server with a few clients , clients with good internet connection don't face any disconnection problems and there client side work smoothly, now the clients with poor connections very slow internet speed connect normally but while send and receive after short time they got socket exception
EIdSocketError with message Socket Error # 10054
Connection reset by peer.


there internet isn't actuality disconnected but they only get this socket error .

what could be the case ? is there some settings needs to be applied for slow internet clients ?

to be more specific slow connection client got disconnected from the server when receive memorystream with this code

 if OutboundCmds <> nil then
    begin
      for I := 0 to OutboundCmds.Count - 1 do
      begin
 
        AContext.Connection.IOHandler.Writeln(OutboundCmds.Strings[I],
          IndyTextEncoding_UTF8);
 
 
        MS := TMemoryStream(OutboundCmds.Objects[I]);
        if MS <> nil then
        begin
          AContext.Connection.IOHandler.LargeStream := true;
          AContext.Connection.IOHandler.Write(MS, 0, true);
        end;
      end;
 
    end;
 
  finally
    if OutboundCmds <> nil then
    begin
      for I := 0 to OutboundCmds.Count - 1 do
      begin
        OutboundCmds.Objects[I].Free;
      end;
    end;
    OutboundCmds.Free;
  end;


specially here

  MS := TMemoryStream(OutboundCmds.Objects[I]);
        if MS <> nil then
        begin
          AContext.Connection.IOHandler.LargeStream := true;
          AContext.Connection.IOHandler.Write(MS, 0, true);
        end;
      end;


what could be the problem ?
Remy Lebeau (Te...


Posts: 9,447
Registered: 12/23/01
Re: indy tcp client and server  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 23, 2017 9:57 AM   in response to: madammar ellias in response to: madammar ellias
madammar ellias wrote:

there internet isn't actuality disconnected but they only get this
socket error .

Chances are, the OS itself, or a firewall/router, is dropping the TCP
connections due to the poor performance.

--
Remy Lebeau (TeamB)
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02