Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Broadcast.

22 views
Skip to first unread message

ole...@gmail.com

unread,
Aug 14, 2008, 6:45:05 PM8/14/08
to ol...@sequoiars.com
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 ?


0 new messages