Re: [twsocket] UDP Newbie...

2008-04-07 Thread Wilfried Mestdagh
Hello zayin,

So first it does not work, then minutes later it works and a little
later same error.

So the explanation is that there is another application that listen on
this ip:port:proto but not all the time.

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

Sunday, April 6, 2008, 19:55, zayin wrote:

 Hi,

Did you try the code that I have posted?

 Yes, copy and paste with:

 ...raised exception ESocketException with message Error 10049 in function
 bind address not available.

 Changing the ip address or port does not change the error. It gives the
 error on the listen.

 Minutes later

 Now after playing with the settings, changing port, ip address etc it works.


 Does not make since.

 Windows firewall did appear for unblocking permission.

 Minutes later

 Now, back to my testing application and changing connect to listen generates
 the same error.

 Going back to connect, all if working again.

 Something I do not understand is going on.


 Ciao,

 Mark




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

 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


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


Re: [twsocket] UDP Newbie...

2008-04-07 Thread Dave Baxter
If you've not already done so   (Assuming you're using XP)

Make an Exception in Windows Firewall settings, for your application
(exe file name) and the port number it listens on.   Especialy if it
needs to accept incoming data from outside the physical (or virtual) PC.

*Usually* XP's Windows firewall does not affect anything communicating
locally with the Localhost address (127.0.0.1)

But it's a common trip point, when things work locally, but not when
part is running on another PC.

Another hint, use different ports to listen on, and talk with.  That
helps enormously when poth parts of the scheme are on the same physical
PC.

Even if you are trying to communicate between two PC's, their firewall's
only need to know about their Incoming data ports, they will pass
outgoing traffic with no problem.

That relates to XP's own internal (Windows) firewall, in general if you
use something else (instead of, or as well as) it may need to be set to
allow outgoing traffic as well, Zone Alarm is one such, though that
will popup and tell you if something is trying to send stuff to the
internet...

Note!  If you have ZoneAlarm, even if you Disable the ZA firewall at
boot time, it has a habit of blocking everything, as all you disable is
the client, not the service, and it seems if the service is running in
the background, but you've not let the client start, it blocks stuff by
default.  Safe, but so frustrating at times!..

UDP, fun when it works, less so when it doesn't!

 -Original Message-
 From: zayin [mailto:[EMAIL PROTECTED] 
 Sent: Sunday, April 06, 2008 10:06 PM
 To: 'ICS support mailing'
 Subject: Re: [twsocket] UDP Newbie...
 
 
 Hi,
 
 No virus programs. Windows firewall is on.
 
 Thanks for all the help,
 
 Mark
 
  
 
 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf Of Wilfried Mestdagh
 Sent: Sunday, April 06, 2008 2:24 PM
 To: ICS support mailing
 Subject: Re: [twsocket] UDP Newbie...
 
 Hello Mark,
 
 Do you have virus software or things like that running? If so 
 stop all services. It could be that some virus / firewall 
 software does strange things. Some of those software are very buggy !
 
 ---
 Rgds, Wilfried [TeamICS]
 http://www.overbyte.be/eng/overbyte/teamics.html
 http://www.mestdagh.biz
 
 Sunday, April 6, 2008, 21:02, zayin wrote:
 
 
  Hi,
 
  The port is not open.
 
  And yes should  is the operative word.
 
  Ciao,
 
  Mark
 
 
 
  -Original Message-
  From: [EMAIL PROTECTED]
  [mailto:[EMAIL PROTECTED] On Behalf Of Dod
  Sent: Sunday, April 06, 2008 1:55 PM
  To: ICS support mailing
  Subject: Re: [twsocket] UDP Newbie...
 
  Hello zayin,
 
  I tried same sample as Wilfried and its OK for me.
 
  Are you sure your port was not in use at the time you tried 
 to start 
  the program ?
 
  netstat -an will show you all opened/listening port.
 
  if none is listening on your port then you application 
 should listen.
 
  regards.
 
 Did you try the code that I have posted?
 
 z Yes, copy and paste with:
 
 z ...raised exception ESocketException with message Error 10049 in 
 z function bind address not available.
 
 z Changing the ip address or port does not change the 
 error. It gives 
 z the error on the listen.
 
 z Minutes later
 
 z Now after playing with the settings, changing port, ip 
 address etc 
 z it
  works.
 
 
 z Does not make since.
 
 z Windows firewall did appear for unblocking permission.
 
 z Minutes later
 
 z Now, back to my testing application and changing connect 
 to listen 
 z generates the same error.
 
 z Going back to connect, all if working again.
 
 z Something I do not understand is going on.
 
 
 z Ciao,
 
 z Mark
 
 
 
 
 z -Original Message-
 z From: [EMAIL PROTECTED]
 z [mailto:[EMAIL PROTECTED] On Behalf Of 
 Wilfried Mestdagh
 z Sent: Sunday, April 06, 2008 12:27 PM
 z To: ICS support mailing
 z Subject: Re: [twsocket] UDP Newbie...
 
 z Hello Mark,
 
 z if you look into source code you see that SendStr call 
 Send, so it 
 z is exacly the same. I used SendStr just because I was lazy :) I 
 z tryed it on a machine with an older version of ICS, but 
 it is exacly 
 z same result with latest version. Did you try the code that I have
 posted?
 
 z It should work, then try Send or other options.
 
 z ---
 z Rgds, Wilfried [TeamICS]
 z http://www.overbyte.be/eng/overbyte/teamics.html
 z http://www.mestdagh.biz
 
 z 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

Re: [twsocket] UDP Newbie...

2008-04-07 Thread zayin

Hi,

While that is a possible explanation it is not the case.

At this point I do not care. If it can happen on this machine it can happen
on a client machine and that is not allowable. Calling connect in place of
listen never fails.

Thanks for your help,

Mark

 

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Wilfried Mestdagh
Sent: Monday, April 07, 2008 3:03 AM
To: ICS support mailing
Subject: Re: [twsocket] UDP Newbie...

Hello zayin,

So first it does not work, then minutes later it works and a little later
same error.

So the explanation is that there is another application that listen on this
ip:port:proto but not all the time.

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

Sunday, April 6, 2008, 19:55, zayin wrote:

 Hi,

Did you try the code that I have posted?

 Yes, copy and paste with:

 ...raised exception ESocketException with message Error 10049 in 
 function bind address not available.

 Changing the ip address or port does not change the error. It gives 
 the error on the listen.

 Minutes later

 Now after playing with the settings, changing port, ip address etc it
works.


 Does not make since.

 Windows firewall did appear for unblocking permission.

 Minutes later

 Now, back to my testing application and changing connect to listen 
 generates the same error.

 Going back to connect, all if working again.

 Something I do not understand is going on.


 Ciao,

 Mark




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

 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


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


Re: [twsocket] UDP Newbie...

2008-04-06 Thread Wilfried Mestdagh
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


Re: [twsocket] UDP Newbie...

2008-04-06 Thread zayin

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


Re: [twsocket] UDP Newbie...

2008-04-06 Thread Wilfried Mestdagh
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


Re: [twsocket] UDP Newbie...

2008-04-06 Thread zayin
Hi,

Did you try the code that I have posted?

Yes, copy and paste with:

...raised exception ESocketException with message Error 10049 in function
bind address not available.

Changing the ip address or port does not change the error. It gives the
error on the listen.

Minutes later

Now after playing with the settings, changing port, ip address etc it works.


Does not make since.

Windows firewall did appear for unblocking permission.

Minutes later

Now, back to my testing application and changing connect to listen generates
the same error.

Going back to connect, all if working again.

Something I do not understand is going on.


Ciao,

Mark




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

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

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


Re: [twsocket] UDP Newbie...

2008-04-06 Thread Dod
Hello zayin,

I tried same sample as Wilfried and its OK for me.

Are you sure your port was not in use at the time you tried to start
the program ?

netstat -an will show you all opened/listening port.

if none is listening on your port then you application should
listen.

regards.

Did you try the code that I have posted?

z Yes, copy and paste with:

z ...raised exception ESocketException with message Error 10049 in function
z bind address not available.

z Changing the ip address or port does not change the error. It gives the
z error on the listen.

z Minutes later

z Now after playing with the settings, changing port, ip address etc it works.


z Does not make since.

z Windows firewall did appear for unblocking permission.

z Minutes later

z Now, back to my testing application and changing connect to listen generates
z the same error.

z Going back to connect, all if working again.

z Something I do not understand is going on.


z Ciao,

z Mark




z -Original Message-
z From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
z Behalf Of Wilfried Mestdagh
z Sent: Sunday, April 06, 2008 12:27 PM
z To: ICS support mailing
z Subject: Re: [twsocket] UDP Newbie...

z Hello Mark,

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

z It should work, then try Send or other options.

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

z 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
z unit:

 unit Unit1;

 interface

 uses
   Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls,
z 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


z --
z To unsubscribe or change your settings for TWSocket mailing list please goto
z http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
z 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


Re: [twsocket] UDP Newbie...

2008-04-06 Thread Wilfried Mestdagh
Hello Mark,

Do you have virus software or things like that running? If so stop all
services. It could be that some virus / firewall software does strange
things. Some of those software are very buggy !

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

Sunday, April 6, 2008, 21:02, zayin wrote:


 Hi,

 The port is not open.

 And yes should  is the operative word.

 Ciao,

 Mark



 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On
 Behalf Of Dod
 Sent: Sunday, April 06, 2008 1:55 PM
 To: ICS support mailing
 Subject: Re: [twsocket] UDP Newbie...

 Hello zayin,

 I tried same sample as Wilfried and its OK for me.

 Are you sure your port was not in use at the time you tried to start the
 program ?

 netstat -an will show you all opened/listening port.

 if none is listening on your port then you application should listen.

 regards.

Did you try the code that I have posted?

z Yes, copy and paste with:

z ...raised exception ESocketException with message Error 10049 in 
z function bind address not available.

z Changing the ip address or port does not change the error. It gives 
z the error on the listen.

z Minutes later

z Now after playing with the settings, changing port, ip address etc it
 works.


z Does not make since.

z Windows firewall did appear for unblocking permission.

z Minutes later

z Now, back to my testing application and changing connect to listen 
z generates the same error.

z Going back to connect, all if working again.

z Something I do not understand is going on.


z Ciao,

z Mark




z -Original Message-
z From: [EMAIL PROTECTED] 
z [mailto:[EMAIL PROTECTED] On Behalf Of Wilfried Mestdagh
z Sent: Sunday, April 06, 2008 12:27 PM
z To: ICS support mailing
z Subject: Re: [twsocket] UDP Newbie...

z Hello Mark,

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

z It should work, then try Send or other options.

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

z 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
z unit:

 unit Unit1;

 interface

 uses
   Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls,
z 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


z --
z To unsubscribe or change your settings for TWSocket mailing list 
z please goto
z http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
z 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


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


Re: [twsocket] UDP Newbie...

2008-04-06 Thread zayin

Hi,

The port is not open.

And yes should  is the operative word.

Ciao,

Mark



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Dod
Sent: Sunday, April 06, 2008 1:55 PM
To: ICS support mailing
Subject: Re: [twsocket] UDP Newbie...

Hello zayin,

I tried same sample as Wilfried and its OK for me.

Are you sure your port was not in use at the time you tried to start the
program ?

netstat -an will show you all opened/listening port.

if none is listening on your port then you application should listen.

regards.

Did you try the code that I have posted?

z Yes, copy and paste with:

z ...raised exception ESocketException with message Error 10049 in 
z function bind address not available.

z Changing the ip address or port does not change the error. It gives 
z the error on the listen.

z Minutes later

z Now after playing with the settings, changing port, ip address etc it
works.


z Does not make since.

z Windows firewall did appear for unblocking permission.

z Minutes later

z Now, back to my testing application and changing connect to listen 
z generates the same error.

z Going back to connect, all if working again.

z Something I do not understand is going on.


z Ciao,

z Mark




z -Original Message-
z From: [EMAIL PROTECTED] 
z [mailto:[EMAIL PROTECTED] On Behalf Of Wilfried Mestdagh
z Sent: Sunday, April 06, 2008 12:27 PM
z To: ICS support mailing
z Subject: Re: [twsocket] UDP Newbie...

z Hello Mark,

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

z It should work, then try Send or other options.

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

z 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
z unit:

 unit Unit1;

 interface

 uses
   Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls,
z 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


z --
z To unsubscribe or change your settings for TWSocket mailing list 
z please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
z 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

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


Re: [twsocket] UDP Newbie...

2008-04-06 Thread zayin

Hi,

No virus programs. Windows firewall is on.

Thanks for all the help,

Mark

 

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

Hello Mark,

Do you have virus software or things like that running? If so stop all
services. It could be that some virus / firewall software does strange
things. Some of those software are very buggy !

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

Sunday, April 6, 2008, 21:02, zayin wrote:


 Hi,

 The port is not open.

 And yes should  is the operative word.

 Ciao,

 Mark



 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of Dod
 Sent: Sunday, April 06, 2008 1:55 PM
 To: ICS support mailing
 Subject: Re: [twsocket] UDP Newbie...

 Hello zayin,

 I tried same sample as Wilfried and its OK for me.

 Are you sure your port was not in use at the time you tried to start 
 the program ?

 netstat -an will show you all opened/listening port.

 if none is listening on your port then you application should listen.

 regards.

Did you try the code that I have posted?

z Yes, copy and paste with:

z ...raised exception ESocketException with message Error 10049 in 
z function bind address not available.

z Changing the ip address or port does not change the error. It gives 
z the error on the listen.

z Minutes later

z Now after playing with the settings, changing port, ip address etc 
z it
 works.


z Does not make since.

z Windows firewall did appear for unblocking permission.

z Minutes later

z Now, back to my testing application and changing connect to listen 
z generates the same error.

z Going back to connect, all if working again.

z Something I do not understand is going on.


z Ciao,

z Mark




z -Original Message-
z From: [EMAIL PROTECTED]
z [mailto:[EMAIL PROTECTED] On Behalf Of Wilfried Mestdagh
z Sent: Sunday, April 06, 2008 12:27 PM
z To: ICS support mailing
z Subject: Re: [twsocket] UDP Newbie...

z Hello Mark,

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

z It should work, then try Send or other options.

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

z 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
z unit:

 unit Unit1;

 interface

 uses
   Windows, Messages, SysUtils, Variants, Classes, Graphics, 
 Controls,
z 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


z --
z To unsubscribe or change your settings for TWSocket mailing list 
z please goto 
z http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
z 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


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

Re: [twsocket] UDP Newbie...

2008-04-01 Thread Wilfried Mestdagh
Hello Mark,

 If I call listen and then try to send I get an error 10049 (Bind Address not
 available)

Are you sure you filled in the correct IP?

 If I call connect and then send, I see the data at the other end but I do
 not get any response in the DataAvailable callback.

No because of the error in previous paragraph it will not listen.

 If I open a second TWSocket to listen I get a callback.

So that is strange. Do you create all in code or do you have TWSocket
component on your form?  If the latter then I suggest to delete it  and
try with a fresh one. Maybe you have changed some properties and have a
conflikt now.

keep a copy of it to check later what exact was changed !

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


Re: [twsocket] UDP Newbie...

2008-04-01 Thread Tobias Rapp
 If I call listen and then try to send I get an error 10049 (Bind Address not
 available)
 
 Are you sure you filled in the correct IP?

As an additional note: You can probably set the IP string of the server 
socket to 0.0.0.0 which will listen on all available interfaces. So 
you don't have to find or configure the appropriate local interface address.

Allowing the user of the program to change that interface address is 
helpful, though, as someone might have two network cards built-in 
connected to two different networks and wants to attach your application 
only to one of the networks.

Regards,
Tobias

@@VON Tobias Rapp t.rapp~~noa-audio.com @@
-- 
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


Re: [twsocket] UDP Newbie...

2008-04-01 Thread zayin
Hello Wilfried,

Are you sure you filled in the correct IP? 

Yes.

Do you create all in code or do you have TWSocket component on your form?

On the form.

I deleted the original component, put a new TWSocket on the form, set the
addr to 192.168.245.2, set the proto to udp, called listen, called Send and
got the bind failure.

Calling connect instead of listen and then send performs without error. I
see the data on the other computer.

So, it appears UDP does require two TWSocket. One to send and one to listen.

Ideas?

Ciao,

Mark
 

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Wilfried Mestdagh
Sent: Tuesday, April 01, 2008 2:26 AM
To: ICS support mailing
Subject: Re: [twsocket] UDP Newbie...

Hello Mark,

 If I call listen and then try to send I get an error 10049 (Bind 
 Address not
 available)

Are you sure you filled in the correct IP?

 If I call connect and then send, I see the data at the other end but I 
 do not get any response in the DataAvailable callback.

No because of the error in previous paragraph it will not listen.

 If I open a second TWSocket to listen I get a callback.

So that is strange. Do you create all in code or do you have TWSocket
component on your form?  If the latter then I suggest to delete it  and try
with a fresh one. Maybe you have changed some properties and have a conflikt
now.

keep a copy of it to check later what exact was changed !

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


Re: [twsocket] UDP Newbie...

2008-04-01 Thread Ionut Muntean
Please post your code. I assure you, everything is working great in ICS ...

/ Ionut Muntean

zayin wrote:
 Hello Wilfried,

   
 Are you sure you filled in the correct IP? 
 

 Yes.

   
 Do you create all in code or do you have TWSocket component on your form?
 

 On the form.

 I deleted the original component, put a new TWSocket on the form, set the
 addr to 192.168.245.2, set the proto to udp, called listen, called Send and
 got the bind failure.

 Calling connect instead of listen and then send performs without error. I
 see the data on the other computer.

 So, it appears UDP does require two TWSocket. One to send and one to listen.

 Ideas?

 Ciao,

 Mark
  

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
 Behalf Of Wilfried Mestdagh
 Sent: Tuesday, April 01, 2008 2:26 AM
 To: ICS support mailing
 Subject: Re: [twsocket] UDP Newbie...

 Hello Mark,

   
 If I call listen and then try to send I get an error 10049 (Bind 
 Address not
 available)
 

 Are you sure you filled in the correct IP?

   
 If I call connect and then send, I see the data at the other end but I 
 do not get any response in the DataAvailable callback.
 

 No because of the error in previous paragraph it will not listen.

   
 If I open a second TWSocket to listen I get a callback.
 

 So that is strange. Do you create all in code or do you have TWSocket
 component on your form?  If the latter then I suggest to delete it  and try
 with a fresh one. Maybe you have changed some properties and have a conflikt
 now.

 keep a copy of it to check later what exact was changed !

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


Re: [twsocket] UDP Newbie...

2008-04-01 Thread zayin
Hello,

Please post your code.

CodeGearT DelphiR 2007 for Win32R R2 Version 11.0.2902.10471

ICS 5.25

TWSocket I set

Addr 192.168.245.2
Port 47808
Proto udp

Var
 outBuffer:array[0..128] of byte;

In a button click:

outBuffer[0]:=$01;
outBuffer[1]:=$02;

WSocket1.Listen;
WSocket1.Send(@outBuffer,2);

Ciao,

Mark



Complete unit:

unit Main;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, WSocket, ComCtrls, StdCtrls, ExtCtrls, WSocketS;

type
  TForm1 = class(TForm)
Button1: TButton;
WSocket1: TWSocket;
procedure Button1Click(Sender: TObject);
  private
   outBuffer:array[0..128] of byte;
  public
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}


procedure TForm1.Button1Click(Sender: TObject);
begin

 outBuffer[0]:=$01;
 outBuffer[1]:=$02;

 WSocket1.Listen;
 WSocket1.Send(@outBuffer,2);
end;


end.

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


Re: [twsocket] UDP Newbie...

2008-03-31 Thread Wilfried Mestdagh
Hello Mark,

 1. Do I need two TWSocket? One to send and one to listen?

No you set it to Listen, and you can send and receive with the same.

 2. Since this is broadcast, will I receive the data I transmit in the
 OnDataAvaliable callback?

Yes if you broadcast then you send to yourself also. Since UDP is not
reliable it could be possible that you don't receive it yourself,
because while you are sending you are not receiving :)

 3. Lots of computers will be sending data how do I determine the source (IP
 address) of the data in the OnDataAvaliable callback?

Please take a look at ReceiveFrom method.

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

Monday, March 31, 2008, 03:36, zayin wrote:


 Hi,

 I am new to programming for UDP, always used TCP, and I have searched for
 answers to some basic questions without joy. Hopefully there are quick
 questions to answer.

 When using TCP and I am the client I use a TWSocket, connect and use the
 object to send and receive data.

 When using TCP and I am the server I use TWSocketServer to listen and when
 OnClientCreate is called it passes an object of my class derived from
 TWSocketClient and I use the object to send and receive data.

 In most cases I am the client for this new program using UDP. Sometimes
 another program may send unsolicited data.

 1. Do I need two TWSocket? One to send and one to listen?
 2. Since this is broadcast, will I receive the data I transmit in the
 OnDataAvaliable callback?
 3. Lots of computers will be sending data how do I determine the source (IP
 address) of the data in the OnDataAvaliable callback?
 4. Any advice about using UDP?

 Ciao,

 Mark



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


Re: [twsocket] UDP Newbie...

2008-03-31 Thread zayin
Hi Wilfried,

Thanks for the reply.

No you set it to Listen, and you can send and receive with the same.

I am having troubles. 

I set the ip address of the TWSocket (UDP) to the correct address.
(192.168.243.1)

If I call listen and then try to send I get an error 10049 (Bind Address not
available)
If I call connect and then send, I see the data at the other end but I do
not get any response in the DataAvailable callback.
If I open a second TWSocket to listen I get a callback.

My error?

Ciao,

Mark



 

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Wilfried Mestdagh
Sent: Monday, March 31, 2008 2:01 AM
To: ICS support mailing
Subject: Re: [twsocket] UDP Newbie...

Hello Mark,

 1. Do I need two TWSocket? One to send and one to listen?

No you set it to Listen, and you can send and receive with the same.

 2. Since this is broadcast, will I receive the data I transmit in the 
 OnDataAvaliable callback?

Yes if you broadcast then you send to yourself also. Since UDP is not
reliable it could be possible that you don't receive it yourself, because
while you are sending you are not receiving :)

 3. Lots of computers will be sending data how do I determine the 
 source (IP
 address) of the data in the OnDataAvaliable callback?

Please take a look at ReceiveFrom method.

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

Monday, March 31, 2008, 03:36, zayin wrote:


 Hi,

 I am new to programming for UDP, always used TCP, and I have searched 
 for answers to some basic questions without joy. Hopefully there are 
 quick questions to answer.

 When using TCP and I am the client I use a TWSocket, connect and use 
 the object to send and receive data.

 When using TCP and I am the server I use TWSocketServer to listen and 
 when OnClientCreate is called it passes an object of my class derived 
 from TWSocketClient and I use the object to send and receive data.

 In most cases I am the client for this new program using UDP. 
 Sometimes another program may send unsolicited data.

 1. Do I need two TWSocket? One to send and one to listen?
 2. Since this is broadcast, will I receive the data I transmit in the 
 OnDataAvaliable callback?
 3. Lots of computers will be sending data how do I determine the 
 source (IP
 address) of the data in the OnDataAvaliable callback?
 4. Any advice about using UDP?

 Ciao,

 Mark



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


[twsocket] UDP Newbie...

2008-03-30 Thread zayin

Hi,

I am new to programming for UDP, always used TCP, and I have searched for
answers to some basic questions without joy. Hopefully there are quick
questions to answer.

When using TCP and I am the client I use a TWSocket, connect and use the
object to send and receive data.

When using TCP and I am the server I use TWSocketServer to listen and when
OnClientCreate is called it passes an object of my class derived from
TWSocketClient and I use the object to send and receive data.

In most cases I am the client for this new program using UDP. Sometimes
another program may send unsolicited data.

1. Do I need two TWSocket? One to send and one to listen?
2. Since this is broadcast, will I receive the data I transmit in the
OnDataAvaliable callback?
3. Lots of computers will be sending data how do I determine the source (IP
address) of the data in the OnDataAvaliable callback?
4. Any advice about using UDP?

Ciao,

Mark


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