Article View: borland.public.cppbuilder.internet.socket
Article #4205Re: server socket
From: Hans Galema
Date: Fri, 18 Mar 2005 22:12
Date: Fri, 18 Mar 2005 22:12
27 lines
2082 bytes
2082 bytes
loukiachr wrote: > are you suremhave you tried it,when 2 clients connect the first might > download the file the second just waits Don�t blame the clients. That is because the server first sends a file to one and then to the other. You said you had an AV. That is solved now I think ? Why don�t you report that ? Wel as long as code is executed in OnClientConnect then a next OnClientConnect will not come. So indeed only one client is served at a time. If you want to server more clients at the same time then you have to change your code. Do not send the whole file in one piece to begin with. What I do with a file sending server is using a TTimer. In the TTimer event there is a loop that goes through the Connections[] array and sends every client for instance 8KB. For every Connection[] you have to keep track of the file to be send and the position where you were with sending. Hans.
Technical Details
Message-ID:
<423b52af$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!feeder2.on.meganewsservers.com!meganewsservers.com!textfeed1.on.meganewsservers.com!38.119.100.83.MISMATCH!news-out.nntp.be!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mailReferences:
<423963b8$2@newsgroups.borland.com> <423aa74f$1@newsgroups.borland.com> <423aafb1$1@newsgroups.borland.com> <423ac662@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,b5f37cb24ca8c183 X-Google-Attributes: gid11508e,public X-Google-Language: ENGLISH,ASCII Date: Fri, 18 Mar 2005 23:12:08 +0100 From: Hans Galema <notused@notused.nl> User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: borland.public.cppbuilder.internet.socket Subject: Re: server socket References: <423963b8$2@newsgroups.borland.com> <423aa74f$1@newsgroups.borland.com> <423aafb1$1@newsgroups.borland.com> <423ac662@newsgroups.borland.com> In-Reply-To: <423ac662@newsgroups.borland.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit NNTP-Posting-Host: 129.125.201.248 Message-ID: <423b52af$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1111184047 129.125.201.248 (18 Mar 2005 14:14:07 -0800) Lines: 29 Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!feeder2.on.meganewsservers.com!meganewsservers.com!textfeed1.on.meganewsservers.com!38.119.100.83.MISMATCH!news-out.nntp.be!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail