Article View: borland.public.cppbuilder.internet.socket
Article #34Broadcast.
From: olegtik
Date: Thu, 14 Aug 2008 22:45
Date: Thu, 14 Aug 2008 22:45
54 lines
2295 bytes
2295 bytes
I have an issue with broadcasting.
I have windows service which broadcast using:
AnsiString message;
message="test";
IdUDPClient1->Broadcast(message, 10304);
In client application I use IdUDPServer1
IdIPAddrMon1->Active = true;
IdIPAddrMon1->ForceCheck();
TIdSocketHandle * shandle;
shandle = IdUDPServer1->Bindings->Add();
shandle->IP = "127.0.0.1";
shandle->Port = 10304;
int i;
for(i=0;i< IdIPAddrMon1->IPAddresses->Count;i++) {
shandle = IdUDPServer1->Bindings->Add();
shandle->IP = IdIPAddrMon1->IPAddresses->Strings[i];
shandle->Port = 10304;
}
IdIPAddrMon1->Active = false;
IdUDPServer1->OnUDPRead = IdUDPServer1UDPRead;
IdUDPServer1->Active = true;
I also have event:
void __fastcall TfmGenSync::IdUDPServer1UDPRead(TObject *Sender,
Cxclasses::TBytes AData, TIdSocketHandle *ABinding)
{
AnsiString Text;
Text = BytesToString(AData,0,1000);
edLines->Lines->Add(Text);
}
I ran sniffer and I know for sure service broadcasting UDP messages,
but client application never got any.
What I am doing wrong ?
Technical Details
Message-ID:
<efdee1a5-574e-4b83-815f-8cdb2219dac1@2g2000hsn.googlegroups.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!postnews.google.com!2g2000hsn.googlegroups.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: 11508e,88f22666e6d8a012,start X-Google-Attributes: gid11508e,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: arc1-ca.pugleaf.net!g2news1.google.com!postnews.google.com!2g2000hsn.googlegroups.com!not-for-mail From: olegtik@gmail.com Newsgroups: borland.public.cppbuilder.internet.socket Subject: Broadcast. Date: Thu, 14 Aug 2008 15:45:05 -0700 (PDT) Organization: http://groups.google.com Lines: 58 Message-ID: <efdee1a5-574e-4b83-815f-8cdb2219dac1@2g2000hsn.googlegroups.com> NNTP-Posting-Host: 69.4.183.142 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: posting.google.com 1218753906 29470 127.0.0.1 (14 Aug 2008 22:45:06 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 14 Aug 2008 22:45:06 +0000 (UTC) Cc: oleg@sequoiars.com Complaints-To: groups-abuse@google.com Injection-Info: 2g2000hsn.googlegroups.com; posting-host=69.4.183.142; posting-account=QyTgngoAAAA0m4Vcd7UYrbaW3Xnv2_Fv User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.1) Gecko/2008070208 Firefox/3.0.1,gzip(gfe),gzip(gfe)