Can't send data from UDP server to client

Giganews Newsgroups
Subject: Can't send data from UDP server to client
Posted by:  Virtek (oferd…@012.net.il)
Date: Sat, 17 Apr 2004

Hello.

On the form there's two UDP components: IdUDPClient1 and IdUDPServer1.

Their properties:
IdUDPServer1.Active = true
IdUDPServer1.DefaultPort = 2500

IdUDPClient1.Active = true
IdUDPClient1.Host = "127.0.0.1" (localhost)
IdUDPClient1.Port = 2500

Upon clicking the button, that's what running:

void __fastcall TForm1::Button1Click(TObject *Sender)
{
IdUDPServer1->Send("127.0.0.1",2500,"string");
Label1->Caption = IdUDPClient1->ReceiveString(6);
}

The problem is that IdUDPClient1->ReceiveString() always return nothing (
"" ).

What am I missing?

Thanks in Advance.

Replies