Newsgroups : Borland : borland.public.delphi.internet.winsock : 2006 Dec : Re: TIdTcpClient / Server and pointer (indy 10)
| Subject: | Re: TIdTcpClient / Server and pointer (indy 10) |
| Posted by: | "Dejan Petrovic" (dejanbng@removethis.ztbclan.com) |
| Date: | Wed, 27 Dec 2006 23:46:47 |
same sending code in both case, only server side is changed and I got error
:
sender code is :
FSendTcp is TIdTcpClient
try
FSendTcp.Connect;
FSendTcp.IOHandler.Write(ms);
FSendTcp.Disconnect;
Result := true;
except
Result := false;
end;
Actually, I want to be sure that stream is complete received, that is why I
want to send small msg from client after stream is received. That would be
only one Byte, 0 and 1 is enought.
Also, your sugestion is preaty important, server shall receive average
200-300 and up to 1000-2000 small messages in time, so, I shall not allow
client to maintain this connection open.
Do you can recomend me complete TIdTcpClient properties assignments and
TIdTcpServer properties assigment and onExecute code ? Maybe I asking to
much but this is critical part of my application.
Also, planing to ignore IP address whose sent undefined messages (eg.
someone trying to made they own client in order to experiment or trying to
hack ...). For a moment planing to made that in OnConnect and just drop
connection, that is ok ?
"Remy Lebeau (TeamB)" <no.spam@no.spam.com> wrote in message
news:45918d93@newsgroups.borland.com...
>
> "Dejan Petrovic" <dejanbng@removeThis.ztbclan.com> wrote in message
> news:459084fd@newsgroups.borland.com...
>
>> I tryed
>> AContext.Connection.IOHandler.ReadStream(st);
>>
>> but in this case client raise error :
>>
>> Socket Error # 10053
>> Software caused connection abort.
>>
>> and steam is not received.
>
> According to the documentation:
>
> WSAECONNABORTED (10053)
>
> Software caused connection abort.
>
> An established connection was aborted by the software in your host
> machine, possibly due to a data transmission timeout or protocol error.
>
> Make sure that your writing code is sending data properly in the first
> place
> so ReadStream() can receive it properly. What does your writing code
> actually look like?
>
>
> Gambit