Hello Mark,

if you look into source code you see that SendStr call Send, so it is
exacly the same. I used SendStr just because I was lazy :) I tryed it on
a machine with an older version of ICS, but it is exacly same result
with latest version. Did you try the code that I have posted?

It should work, then try Send or other options.

---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz

Sunday, April 6, 2008, 15:34, zayin wrote:


> Hello,

> How about with send and not sendStr?

> That is the only difference I see.

> And what version of ICS are you using?

> Cheers,

> Mark

 

> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On
> Behalf Of Wilfried Mestdagh
> Sent: Sunday, April 06, 2008 4:57 AM
> To: ICS support mailing
> Subject: Re: [twsocket] UDP Newbie...

> 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


-- 
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

Reply via email to