Article View: borland.public.cppbuilder.internet.socket
Article #4189Re: server socket
From: loukiachr
Date: Fri, 18 Mar 2005 10:03
Date: Fri, 18 Mar 2005 10:03
29 lines
2075 bytes
2075 bytes
sorry mistake its on the on client connect event not on get socket
void __fastcall TForm1::ServerSocket1ClientConnect(TObject *Sender,
TCustomWinSocket *Socket)
{
TFileStream* file = new TFileStream("a.dat",fmOpenRead);
try
{
SendStream(ServerSocket1->Socket->Connections[0],file) ;
}
__finally {
delete file;Edit1->Text=Edit1->Text.ToInt()+1;
}
}
plz tell me what changes should be made to work for many clients
� "loukiachr" <loukiachr@hotmail.com> ������ ��� ������
news:423963b8$2@newsgroups.borland.com...
> can one server socket handle many client sockets?
> i want to create a server (using server socket)that transfers file to each
> client that is connected accordingly to the file that is requested..for
> example if client1 asks for a.txt give him,but in the same time client2
> might ask b.txt and give him...i have checked the code for file transfer
> from serversocket to client socket
> i use the code that (i think)remy posted many weeks ago...
>
>
Technical Details
Message-ID:
<423aa74f$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news1.google.com!proxad.net!213.200.89.82.MISMATCH!tiscali!newsfeed1.ip.tiscali.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<423963b8$2@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,b5f37cb24ca8c183 X-Google-Attributes: gid11508e,public X-Google-Language: ENGLISH,ASCII Reply-To: "loukiachr" <loukiachr@hotmail.com> From: "loukiachr" <loukiachr@hotmail.com> Newsgroups: borland.public.cppbuilder.internet.socket References: <423963b8$2@newsgroups.borland.com> Subject: Re: server socket Date: Fri, 18 Mar 2005 12:03:00 +0200 Lines: 31 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 NNTP-Posting-Host: 195.251.45.43 Message-ID: <423aa74f$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1111140175 195.251.45.43 (18 Mar 2005 02:02:55 -0800) Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news1.google.com!proxad.net!213.200.89.82.MISMATCH!tiscali!newsfeed1.ip.tiscali.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail