Article View: borland.public.cppbuilder.internet.socket
Article #5682Re: Creating Socket dynamically
From: Remy Lebeau (TeamB)
Date: Tue, 06 Jul 2004 00:08
Date: Tue, 06 Jul 2004 00:08
43 lines
1945 bytes
1945 bytes
"Orlando Lopez" <hlopezrd@hotmail.com> wrote in message
news:40e9d2c3$1@newsgroups.borland.com...
> I'm using VCL components TServerSocket and TClientSocket.
Then you instantiate them like any other dynamically-allocated class - via
the 'new' operator - ie:
TClientSocket *client = new TClientSocket(this);
client->Address = "207.14.32.23";
client->Port = 12345;
client->OnRead = ReadFromClient;
//...
client->Open();
//...
client->Close();
delete client;
void __fastcall TMyForm::ReadFromClient(Object* Sender,
TCustomWinSocket* Socket)
{
//...
}
TServerSocket *server = new TServerSocket(this);
server->Port = 12345;
server->OnClientRead = ReadFromServerClient;
//...
server->Open();
//...
server->Close();
delete server;
void __fastcall TMyForm::ReadFromServerClient(TObject* Sender,
TCustomWinSocket* Socket)
{
//...
}
Gambit
Technical Details
Message-ID:
<40e9ed61@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!fr.ip.ndsoftware.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<40e9b6fd$1@newsgroups.borland.com> <40e9ceb6$1@newsgroups.borland.com> <40e9d2c3$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,e5255999b3182541 X-Google-Attributes: gid11508e,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Remy Lebeau \(TeamB\)" <gambit47.no.spam@no.spam.yahoo.com> Newsgroups: borland.public.cppbuilder.internet.socket References: <40e9b6fd$1@newsgroups.borland.com> <40e9ceb6$1@newsgroups.borland.com> <40e9d2c3$1@newsgroups.borland.com> Subject: Re: Creating Socket dynamically Date: Mon, 5 Jul 2004 17:08:24 -0700 Lines: 45 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: 68.69.17.10 Message-ID: <40e9ed61@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1089072481 68.69.17.10 (5 Jul 2004 17:08:01 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!fr.ip.ndsoftware.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail