Re: [twsocket] THttpCli exception errors

2008-04-01 Thread crazdcodr
I have tried assigning a procedure to handle this exception using your
suggestions, using this code:

-
HttpCli.CtrlSocket.OnBgException := ExErr;
...
procedure TForm1.ExErr(sender: TObject; E: Exception; var CanClose:
Boolean);
Begin
try
CanClose := False;
Label1.Caption := 'Exception error.';
except
end;
End;
-

The error still persists, though, and remains to crash the app. Is there
another way to go about this error handling?
Thank you.

-- 
Want an e-mail address like mine?
Get a free e-mail account today at www.mail.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 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] THttpCli exception errors

2008-04-01 Thread Wilfried Mestdagh
Hello,

 The error still persists, though,

I don't see your original post. Can you tell me what the error is?

 and remains to crash the app.

What do you mean by 'crash'? Is there an exception error, is the
application non responcive, something else?

 Is there another way to go about this error handling?

If you run in the IDE and set 'stop on delphi exceptions' ehen then
debugger stops and you can check the callstack and others to see what is
wrong.

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

Tuesday, April 1, 2008, 08:28, [EMAIL PROTECTED] wrote:

 I have tried assigning a procedure to handle this exception using your
 suggestions, using this code:

 -
 HttpCli.CtrlSocket.OnBgException := ExErr;
 ...
 procedure TForm1.ExErr(sender: TObject; E: Exception; var CanClose:
 Boolean);
 Begin
 try
 CanClose := False;
 Label1.Caption := 'Exception error.';
 except
 end;
 End;
 -

 The error still persists, though, and remains to crash the app. Is there
 another way to go about this error handling?
 Thank you.

 -- 
 Want an e-mail address like mine?
 Get a free e-mail account today at www.mail.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 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


[twsocket] Connecting and Disconnecting

2008-04-01 Thread Éric Fleming Bonilha
Hello

What is the implication on the TCP control of disconnecting and connecting 
using the same TWSocket object? what I mean is that:

FSocket.Disconnect;

FSocket.Addr := 'x.x.x.x';
FSocket.Port := '80';

FSocket.Connect;


What is the implication of doing that on sequence?? 

I ask that because we are having some problems with the server machines (Server 
is not ICS), apparently it keeps the connection on it´s memory and after a lot 
of connections and disconnections it stop working (The host device) because it 
has a lot of half-closed connections.

This is the right way of reconnecting? If not, what should be the best? Try to 
reconnect on the OnSessionClosed?

Thanks!
Éric
-- 
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