Hello Mark, I tryed to do the same as you listen with IP addres of same machine, and when I click the button, 'Hello' is received. This is the complete unit:
unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, WSocket; type TForm1 = class(TForm) WSocket1: TWSocket; Button1: TButton; procedure Button1Click(Sender: TObject); procedure WSocket1DataAvailable(Sender: TObject; ErrCode: Word); procedure FormCreate(Sender: TObject); private end; var Form1: TForm1; implementation {$R *.dfm} procedure TForm1.FormCreate(Sender: TObject); begin AllocConsole; end; procedure TForm1.Button1Click(Sender: TObject); begin WSocket1.Addr := '192.168.0.11'; WSocket1.Port := '47808'; WSocket1.Proto := 'udp'; WSocket1.Listen; WSocket1.SendStr('Hello'); end; procedure TForm1.WSocket1DataAvailable(Sender: TObject; ErrCode: Word); begin WriteLn(TWSocket(Sender).ReceiveStr); end; end. --- Rgds, Wilfried [TeamICS] http://www.overbyte.be/eng/overbyte/teamics.html http://www.mestdagh.biz -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be