Article View: borland.public.cppbuilder.internet.socket
Article #3475Re: TServerSocket sends a unwanted acknowlege
From: Billy Holliday
Date: Wed, 21 Sep 2005 11:39
Date: Wed, 21 Sep 2005 11:39
44 lines
2406 bytes
2406 bytes
Hi Hans.
> > next time i get a socket error 4 : the windows pc (TServerSocket) has
made
> > a push, with a wrong sequence-number. (why??)
>
> Socket error 4 ? Where ? Does the client display that ? Never
> saw a TServerSocket with that error number.
>
I see it on a debug memo and in the protokoll analyser.
void __fastcall TForm::ServerSocketClientError( TObject *Sender,
TCustomWinSocket *Socket, TErrorEvent ErrorEvent, int &ErrorCode )
{
Memo1->Lines->Add("Socket-Error at Port:" + IntToStr( Socket->RemotePort)
+ " Nr.: "+ IntToStr( (int) (ErrorEvent)) );
ErrorCode= 0;
}
The TCP/IP-Stack is sending a automatic generated ACK ( 0 bytes data) as
reponse to the last client message.
Then the TServerSocket is sending the really response (5 seconds later).
But he is doing this with:
the same sequence number,
the same ack number,
the same win number.
The client makes a correct response, but the TServerSocket rises a
Clienterror, because the sequence number is wrong.
Perhaps i should try the INDY TCP componente, but i don't know, how to get
the lenght of the received data message
:-(
So i don't know, how long is the message......
Thanks.
Technical Details
Message-ID:
<4331460b$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news3.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<433101e8@newsgroups.borland.com> <43310420$1@newsgroups.borland.com> <433113a8$1@newsgroups.borland.com> <433116ec@newsgroups.borland.com> <43311dc7$1@newsgroups.borland.com> <4331319f$1@newsgroups.borland.com> <43313d37@newsgroups.borland.com> <43313ee1$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,2e35895317a3987d X-Google-Attributes: gid11508e,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Billy Holliday" <NoSpam@Hohoho.com> Newsgroups: borland.public.cppbuilder.internet.socket References: <433101e8@newsgroups.borland.com> <43310420$1@newsgroups.borland.com> <433113a8$1@newsgroups.borland.com> <433116ec@newsgroups.borland.com> <43311dc7$1@newsgroups.borland.com> <4331319f$1@newsgroups.borland.com> <43313d37@newsgroups.borland.com> <43313ee1$1@newsgroups.borland.com> Subject: Re: TServerSocket sends a unwanted acknowlege Date: Wed, 21 Sep 2005 13:39:22 +0200 Lines: 49 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4927.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4927.1200 NNTP-Posting-Host: 212.202.128.58 Message-ID: <4331460b$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1127302667 212.202.128.58 (21 Sep 2005 04:37:47 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news3.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail