Article View: borland.public.cppbuilder.internet.socket
Article #3229i need ideas/comments with tclientsocket
From: Alfred
Date: Mon, 31 Oct 2005 13:35
Date: Mon, 31 Oct 2005 13:35
9 lines
1826 bytes
1826 bytes
Hello, i need any idea/comment please. I am making a client/server application with TClientSocket/TServerSocket and i have a little problem. - when the server read I can have only a part of the full package (for lag, fragmentation... ) so my idea is to make my package I send from client to server like it : "1234xxxxxxxxx" so 1234 is the full lenght of the data the server need to riceve and xxxxx are the data. Here is the problem , for example : - server get only half package, if i read the "1234" (Socket->ReceiveBuf(buf,4);) and i check Socket->ReceiveLength() I can see the package is not complete, but If I wait till next ClientSocketRead for a full package I cannot read again the length for another check before process it. This can not be a problem with a single client becouse i can save the lenght into a string somewhere but it is a problem with a high traffic server i think. I dont like indy, i like to make all by myself.. Any idea ? Thank you very much Alfred
Technical Details
Message-ID:
<43662baf$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news4.google.com!border1.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-mailShow Full Headers
Complete Article Headers
X-Google-Thread: 11508e,5c33b8c6a9ca7fdb,start X-Google-Attributes: gid11508e,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Alfred" <alf@no.spam.not.valid.email> Sender: "Alfred" <alf@no.spam.not.valid.email> Reply-To: "Alfred" <alf@no.spam.not.valid.email> Subject: i need ideas/comments with tclientsocket Newsgroups: borland.public.cppbuilder.internet.socket X-User-Info: 82.52.136.128 NNTP-Posting-Host: 207.105.83.66 Message-ID: <43662baf$1@newsgroups.borland.com> Date: 31 Oct 2005 06:35:27 -0700 X-Trace: newsgroups.borland.com 1130769327 207.105.83.66 (31 Oct 2005 06:35:27 -0700) Lines: 9 Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news4.google.com!border1.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