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…
Date: Sat, 17 Apr 2004


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

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

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

Upon clicking the button, that's what running:

void __fastcall TForm1::Button1Click(TObject *Sender)
Label1->Caption = IdUDPClient1->ReceiveString(6);

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

What am I missing?

Thanks in Advance.