[twsocket] Resend: TSslSmtpCli...

2013-01-25 Thread zayin
Does no one know the answer?

Hello,

I have seen TSslSmtpCli mentioned a couple of places but very little data.
Does such a thing exist? Is it part of the ICS-SSL suite?
 
I am currently using TSmtpCli and TPop3Cli for some very light email
notifications. The need to support TSL/SSL has come up and I am looking
around for data.

Any pointers?

Thanks.

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


[twsocket] TSslSmtpCli...

2013-01-21 Thread zayin

Hello,

I have seen TSslSmtpCli mentioned a couple of places but very little data.
Does such a thing exist? Is it part of the ICS-SSL suite?
 
I am currently using TSmtpCli and TPop3Cli for some very light email
notifications. The need to support TSL/SSL has come up and I am looking
around for data.

Any pointers?

Thanks.

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] HTML...HttpClient...

2012-10-27 Thread zayin
He answer was to add:

!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01//EN
http://www.w3.org/TR/html4/strict.dtd;

as the first line.

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


[twsocket] HTML...HttpClient...

2012-10-26 Thread zayin
Hello,

This code:

HTML
 HEAD
  META HTTP-EQUIV=Pragma CONTENT=no-cache 
  META HTTP-EQUIV=Expires CONTENT=-1
  TITLEThe HMI/TITLE
  META http-equiv=refresh content=5/
 /HEAD
 BODY style=background:#FF
  H3A HREF=/index.htmlHome/A/H3 
  nbsp A HREF=/SCRL.htmlScreens/A
  BR
  BR
  test 10/26/2012 7:40:10 PM
  BR
  BR
  img src=/SCRSI/ID=0 alt=test / 
 /BODY
 HEAD
  META HTTP-EQUIV=Pragma CONTENT=no-cache 
  META HTTP-EQUIV=Expires CONTENT=-1
 /HEAD
/HTML

works in IE7 and IE8. 

In IE9 the page loads but the image does not show, the refresh works, (the
time changes) just no image.
If I select F5 (Refresh) the image does display and update when the refresh
is called from then on.
If I turn on Compatibility view the image displays correctly.

I have searched hi and low with no joy.

Anyone have any ideas?

Thanks,

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] TiggerSessionClosed...

2012-10-11 Thread zayin

Thanks for the reply Arno.

Otherwise make sure you close all clients before destroying the server
component.

I made sure that happens before posting the message and the clients are
freed before the server.

It is on shutdown so I am not worried. The issue is FastMM reports the leak
each time I quit and that is a pain.

Any idea how I can handle? Some call to the server before freeing it to
handle all the messages. Or ???






--
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] TiggerSessionClosed...

2012-10-11 Thread zayin
 It is probably a false report...

MadExcept also reports it as a memory leak.




--
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] TiggerSessionClosed...

2012-10-11 Thread zayin
 but unless is cumulative it really does not matter.

I concur. It is just a pain. 

IMHO, there should be some step(s) to close the clients and close the server
and not have a memory leak. 



--
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] TiggerSessionClosed...

2012-10-11 Thread zayin
 ..happens, for instance, _if the destination Window has been destroyed
after the call to PostMessage

Because the program is ending when the leak occurs that is exactly what I
think is occurring.

So, after I close all the clients, I call now server.ProcessMessages and
that seems to handle the leak.

Do you see any problem with that solution?

Thanks for your help and time Arno.





--
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] TiggerSessionClosed...

2012-10-11 Thread zayin
 I try to avoid calling the message pump

Ditto. 

 DisconnectAll

That worked. 

So, now I close the server, call DisconnectAll and no memory leak.

Thanks

--
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] Re TiggerSessionClosed...

2012-10-11 Thread zayin

 ..happens, for instance, _if the destination Window has been destroyed
after the call to PostMessage

Because the program is ending when the leak occurs that is exactly what I
think is occurring.

So, after I close all the clients, I call now server.ProcessMessages and
that seems to handle the leak.

Do you see any problem with that solution?

Thanks for your help and time Arno.





--
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] TiggerSessionClosed...

2012-10-10 Thread zayin
Hello,

I have upgraded from D2007 to XE and I am now using version 7.04 of ICS.

When I close the socket I am getting a memory leak at line 686 in
TWSocketClient. TiggerSessionClosed.

the line is New(PIdRec);

I do see that if the PostMessage call fails, PIdRec is released on line 696.

If the PostMessage succeeds, PIdRec is not released.

I have no idea why the PostMessage would fail.

Am I wrong in thinking PIdRec should be released regardless of PostMessage
success/fail?

Ideas?

Thanks,

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


[twsocket] THTTPserver...

2012-08-30 Thread zayin
Hi,

Version  7.39

I need to log the IP address of the client when it connects to the server.

OnClientConnect seems to be the best place but I do not see any way to get
the IP address of the connecting client?

Suggestions?

Thanks,

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] THTTPserver...

2012-08-30 Thread zayin

GetPeerAddr

onHTTPRequestDone  is also a good place, if you want to log bytes
delivered, etc..

DOH!

Of course.

When I was initially testing... oh never mind. I had one of those moments.

Thanks,

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] THTTPserver...

2012-08-30 Thread zayin
GetPeerAddr

onHTTPRequestDone  is also a good place, if you want to log bytes delivered,
etc..

DOH!

Of course.

When I was initially testing... oh never mind. I had one of those moments.

Thanks,

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


[twsocket] HTTP server...

2012-07-21 Thread zayin
Hello,

A user will be on a page. He will click a button and I will receive a URL
with some parameters. All good.

Now, I do not have a page to show him. The URL is only for passing in the
parameters. The URL for the page passing the parameters and the current page
are not the same. The URL for passing in the parameters is fixed. The URL
for the button's 'host' page is not fixed.

I want the current page in the browser to stay the same. The one with the
button.

I can answer with a redirection to the current page (the button host page).
Works but not the smoothest operation.

I was wondering if there is a better solution. Some answer code that tells
the browser the data was received but not to change page or to reload the
button host page.

Cheers,

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] HTTP server...

2012-07-21 Thread zayin
Hello,

Thanks.

It looks like:  AnswerString(Flags,'204 No Content','','','');  works fine.

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


[twsocket] THttpServer and THttpConnection...

2012-07-03 Thread zayin
Hello,

Delphi 2007,  ICS 7.39 (THttpServer)

I have a server (THttpServer) and clients derived from THttpConnection and
all has been working well.

I now need to set the initial page a user accesses after log on, regardless
of the url he is attempting to access first.

All the log on code is working and I am wondering where to 'redirect' the
user to 'his' initial page.

I do not want to use the redirect command in the header of the index page.
Is that the best/only way?

After logon the first place that seems possible is in the client get
document. Seems not smooth and the url would not match the real page. ???

Is there something I can do in the server AuthResult that would work?

Any other solutions?

Thanks,

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


[twsocket] THttpServer...

2012-07-03 Thread zayin
Hello,

I have a timer that I am using to require a re-logon after X minutes.

In the AuthGetPassword I check if the user has timed out and do not supply a
password and this causes the browser to ask for the credentials. 

Perfect.

If I select cancel for when asked for the user name and password I get the
401 Access Denied.

Perfect

Now the problem. I go to the address bar and hit return or hit the refresh
button, the browser sends the stored name and password. This I do not want.

How can flush/delete/invalidate the password the browser has stored for the
user name?

Or am I going at this all wrong?

Thanks,

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


[twsocket] TFtpClient transfer time...

2011-07-23 Thread zayin
Hello,

I am using TFtpClient, version 7.12 to transfer a single file. The elapsed
time is over 4 1/2 minutes. When I transfer the same single file with
FileZilla the elapsed time is 2 1/2 minutes.

Nothing I have changed much changes the elapsed time.

I have a callback FtpClient1Progress64 to update a single label. Removing it
did not change the time. FileZilla updates several graphic elements during
the transfer.

The network utilization for TFtpClient is 0.84, for FileZilla 1.59.

And that seems to be the issue. I enabled the bandwidth control and I get it
lower but never higher than 0.91. Which it bounces to with bandwidth control
off.

How do I speed up the transfer? 

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] HttpServer and password...

2011-06-15 Thread zayin
Hi,

I was finally able to get back to the password failing when it is empty.
(which is OK)

The lines in the source code that prevent the '' password appear to be:

unit OverbyteIcsHttpSrv;

function THttpConnection.AuthDigestCheckPassword(const Password: String):
Boolean;
...

if Password = '' then begin
Result := FALSE;
Exit;
end; 



A 401 is returned.

What am I missing?

Thanks,

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] HttpServer and password...

2011-06-15 Thread zayin
Hello,

As I told you in my previous message, you missed that password (passed as 
 var to the event handler) is initialized to #0 which is NOT an empty
string.

No, I am using what I said:

Password:='';

And you said This is the proper way.


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] HttpServer and password...

2011-06-15 Thread zayin
Hi,

 I just checked in a change that removes these lines, so THttpServer...

I commented out the lines, here, and it works.

Thanks.

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


[twsocket] HttpServer and password...

2011-06-05 Thread zayin
Hello,

HttpServer version 7.29.

I set the server to: HttpServer.AuthTypes:=[atBasic,atDigest]

The user tries to logon and enters his name. For this user he does not have
a password and that is OK with me. The browser is using digest mode.

The password field is blank in OnAuthGetPassword. I do not change the
'Password'. It is #0.

But the logon fails.

OnAuthResult has false in success.

What am I doing wrong? Must the user have a password?

Thanks,

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] HttpServer and password...

2011-06-05 Thread zayin
Hello,

 The password field is blank in OnAuthGetPassword. I do not change the
 'Password'. It is #0.

You should probably change Password to the empty string. #0 is /not/ the 
empty string. This has been designed so that you can use an empty password 
which is different than not changing Password var parameter !

During testing I set the var Password to '' and had the same result.

Password:='';

Is there some other way I should do it?

Thanks,

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] HTTP...

2011-03-19 Thread zayin
Hello,

http://www.cs.cf.ac.uk/Dave/PERL/node201.html

Use ICS ExtractURLEncodedValue function to decode these parameters

Thanks for the link and the function.

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] AuthType for THttpServer...

2011-03-13 Thread zayin
Hi,

Thanks for your help Arno.

I decided to upgrade to V7 and Safari can now log on once I set the
AuthTypes to the correct values.

Regards,

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


[twsocket] AuthType for THttpServer...

2011-03-12 Thread zayin
Hello,

I have been using AuthType set to atBasic to support all comers.

I have a new user that is using Safari and it appears to only use atDigest.
I have not found a setting in Safari to allow basic mode. I tried sending
the user name or user name and password from Safari in the url but that did
not work.

I do not see in THttpServer how to support both. 

Ideas?

Thanks,

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] AuthType for THttpServer...

2011-03-12 Thread zayin
Hi Arno,

Thanks for the response.

 Have a look at the OverbyteIcsWebServ demo it provides Basic, Digest 
 and NTLM examples and one for all three authentication types. 

It produces the same result with Safari. The source file is Mar 04, 2006
V1.5.

In the example, if the client URL is configured correctly the auth will be
set to the data contained in the URL. If the URL is '/' which is the case
when the user is browsing to an IP address, the auth configured on the
THttpServer component is used. And that is the rub. I need to leave the
property as basic auth but Safari only accepts digest.

So, it appears I need have users of Safari use a special URL so I can change
the auth to digest.

Sound right?

Ciao,

Mark








-Original Message-
From: zayin [mailto:za...@pdq.net] 
Sent: Saturday, March 12, 2011 9:37 AM
To: 'twsocket@elists.org'
Subject: AuthType for THttpServer...

Hello,

I have been using AuthType set to atBasic to support all comers.

I have a new user that is using Safari and it appears to only use atDigest.
I have not found a setting in Safari to allow basic mode. I tried sending
the user name or user name and password from Safari in the url but that did
not work.

I do not see in THttpServer how to support both. 

Ideas?

Thanks,

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] TFTPClient...

2010-11-23 Thread zayin
Hello,

 What are the dataportrangeend and dataportrangestart properties in
the...

As you may already know, FTP is using TWO ports: one for commands and one 
for data. And for data, a FTP client act as a server : unless you select 
passive mode, a FTP client accept data connection from the FTP server. This

poses a problem with multiple simultaneous FTP transfer. This is where the 
port range is involved. The FTP client component will use the port range - 
if specified - for accepting data connection. This is mandatory when you 
have a security product which restrict input connections.

Whenever possible, it is better to use FTP passive mode in which the FTP 
client remains a client for everything, that is has only outgoing 
connections.


Great answer. Thanks Francois.

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


[twsocket] TFTPClient...

2010-11-23 Thread zayin
Hello,

I think this is my last question for TFTPClient. Is there a way to prevent
the overwriting of the file if it exists on the server? Overwrite seems to
be the default. 

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

2010-11-23 Thread zayin
Hello,

Thanks for the answer.

I might have put the question wrong.

If the file exist on the server I do not want to overwrite the file. I want
to abort the transfer. Is that possible?

Or do I need to check if the file exists before TFTPClient.Tansmit?

If I need to check first, what is the best method?

Thanks,

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] TFTPClient...

2010-11-19 Thread zayin
Hello,

Thank you both for the answers.

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


[twsocket] TFTPClient...

2010-11-18 Thread zayin
Hello,

What is the account property in the TFTPClient component? I searched and
could not find any description.

Thanks,

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] TCP LocalPort...

2010-10-09 Thread zayin
Hello,

Do you really need to determine free local port? By what you wrote it
doesn't seem you need that.

Yes.

You need a free local port if you are making a server type of
application, not a client application.

I am sorry, that is not correct. It is a requirement of the protocol that
the port number of the client be in the range of 1 - 32767.

This is not the first protocol I have implemented to contain client port
number requirements. The last one I recall, OMRON FINS, required the port
number on the server and client match. If you configured the server for port
7 the client also had to be port 7.


Francois,

 Exception handler.

Thanks. I will make it so. 

It does seem counter-intuitive for a non-blocking framework to not use a
callback for this error. For example, should I wrap Connect in a try
except? It may be that it is the only way to handle such a error. 

netstat can show all open ports. Does it do trial and error on all port
numbers? Or does the OS know and MS has not published how to get the
information?

Thank you both for the response,

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


[twsocket] TCP LocalPort...

2010-10-08 Thread zayin
Hello,

As the client I need to get a TCP connection to the server. The server
requires the port number of the client be 1 - 32767. The server has a fixed
port number.

I know I can set the LocalPort property and that works, as long as the port
number I choose is not in use. If it is in use I do not get an error call
back. It just does not connect and an internal timer catches the failure.

I have two questions.

How can I determine if a local port number is in use?
If I cannot determine it before calling connect, how do I catch the error
that the port is in use?

Thanks,

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

2010-03-24 Thread zayin
Hi,

Thanks. 

I set the addr to 0.0.0.0, switched to SendTo and the reply was correct.

Since I will be communicating with many of these external devices I wanted
one TWSocket for each external device, that was why I set the addr field to
the external devices IP address. Using 0.0.0.0 it appears all the external
devices will reply through that one TWSocket and I will need to sort them
out in the OnDataAvaliable.

Is that correct?

Thanks,

Mark

-Original Message-
From: twsocket-boun...@elists.org [mailto:twsocket-boun...@elists.org] On
Behalf Of wilfried Mestdagh
Sent: Wednesday, March 24, 2010 3:03 AM
To: 'ICS support mailing'
Subject: Re: [twsocket] UDP...

Hi,

 WSocket1.Addr:='192.168.1.2';
 WSocket1.port:='9600';
 I get an error 10049. 
Means you cannot bind to that address. '192.168.1.2' is the address on the
remote machine, you can not listen on that.

 The only difference I can see is the sending local port number is not
9600.

This should make no difference. You can set local port of course. There is a
property for that.

-- 
mvg, Wilfried
http://www.mestdagh.biz

-Oorspronkelijk bericht-
Van: twsocket-boun...@elists.org [mailto:twsocket-boun...@elists.org] Namens
zayin
Verzonden: woensdag 24 maart 2010 1:12
Aan: twsocket@elists.org
Onderwerp: [twsocket] UDP...

Hello,

I ran into this a couple years ago and I found a work around so I dropped
it. Now, new computer, new OS, new task. So, any reasons for my failure that
might have been computer/OS related are...

I am using Wireshark to verify what I am seeing.

Using D2007 and ICS version 5.25, UDP with TWSocket.

When I call 'Listen' after setting:

WSocket1.Addr:='192.168.1.2';
WSocket1.port:='9600';

I get an error 10049. Then of course if I send some bytes I get a 10057
error.

When I call 'Connect' after setting:

WSocket1.Addr:='192.168.1.2';
WSocket1.port:='9600';

I can send the bytes and Wireshark shows them as transmitted and I get a
reply from 192.168.1.2.

The reply I get back indicates there is an error in the bytes. I KNOW the
bytes are correct. The device also supports TCP with the same bytes and when
I use TCP all is good. I have other software, I did not create, and it works
with UDP using the same byte stream.

The only difference I can see is the sending local port number is not 9600.
I am not sure why that matters. The software that does work does have a
local port number of 9600. And after hours, that is the only difference I
can see.

The source is below and I can upload a project if someone needs it.

Any ideas? What am I missing?

Ciao,

Mark

unit Main;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, WSocket, IcsLogger;

type
  TForm2 = class(TForm)
Memo1: TMemo;
WSocket1: TWSocket;
ListenStartBtn: TButton;
ListenStopBtn: TButton;
Label1: TLabel;
Label2: TLabel;
ConnectStartBtn: TButton;
StopConnectBtn: TButton;
IcsLogger1: TIcsLogger;
procedure ListenStartBtnClick(Sender: TObject);
procedure WSocket1Error(Sender: TObject);
procedure WSocket1SessionConnected(Sender: TObject; ErrCode: Word);
procedure WSocket1SessionClosed(Sender: TObject; ErrCode: Word);
procedure WSocket1DataAvailable(Sender: TObject; ErrCode: Word);
procedure ListenStopBtnClick(Sender: TObject);
procedure ConnectStartBtnClick(Sender: TObject);
  private
holdingBuff:array [0..2048] of byte;
  public
{ Public declarations }
  end;

var
  Form2: TForm2;

implementation

{$R *.dfm}

var
 outBuffer:array [0..17] of byte =
($80,$00,$02,$00,$02,$00,$00,$04,$00,$03,$01,$01,$B0,$00,$00,$00,$00,$01);

procedure TForm2.ConnectStartBtnClick(Sender: TObject);
begin
 Memo1.Lines.Add('');
 Memo1.Lines.Add('ConnectStartBtnClick');
 WSocket1.Addr:='192.168.1.2';
 WSocket1.port:='9600';
 Memo1.Lines.Add('Connect');
 WSocket1.Connect;
 Memo1.Lines.Add('Send');
 WSocket1.Send(@outBuffer,18);
end;

procedure TForm2.ListenStartBtnClick(Sender: TObject);
begin
 Memo1.Lines.Add('');
 Memo1.Lines.Add('ListenStartBtnClick');
 WSocket1.Addr:='192.168.1.2';
 WSocket1.port:='9600';
 Memo1.Lines.Add('Listen');
 WSocket1.Listen;
 Memo1.Lines.Add('Send');
 WSocket1.Send(@outBuffer,18);
end;

procedure TForm2.ListenStopBtnClick(Sender: TObject);
begin
 Memo1.Lines.Add('Stop');
 WSocket1.Close;
end;

procedure TForm2.WSocket1DataAvailable(Sender: TObject; ErrCode: Word);
var
 byteCount:integer;
begin
 if (ErrCode  0) then
  Memo1.Lines.Add('WSocket1DataAvailable: ' + IntToStr(ErrCode));

 Memo1.Lines.Add('WSocket1DataAvailable');
 byteCount:=WSocket1.Receive(@holdingBuff[0],sizeOf(holdingBuff));
 if (byteCount  1) then
  Exit;
 Memo1.Lines.Add(IntToStr(byteCount));
end;

procedure TForm2.WSocket1Error(Sender: TObject);
begin
 Memo1.Lines.Add('WSocket1Error: ' + IntToStr(WSocket1.LastError));
end;

procedure TForm2.WSocket1SessionClosed(Sender: TObject; ErrCode: Word);
begin
 if (ErrCode  0) then
  Memo1.Lines.Add

Re: [twsocket] UDP...

2010-03-24 Thread zayin
Hi,

Thanks.

 ...originating only from that interface.

I have done that kind of binding before using LocalAddr. I assume it would
be the same property for UDP.

OK. I have another application where I am using UDP and I set the addr
property to the remote IP address. Then I call connect, use send and
OnDataAvaliable and all works fine.

What would be the reason(s) that I am not able to do the same thing with
this new device? Error 10049 says I cannot bind to the remote address.  What
does the connect call, using UDP, send to the remote that caused the 10049
on one device and not others? I am so confused. ;)

Thanks for all the help,

Mark





-Original Message-
From: twsocket-boun...@elists.org [mailto:twsocket-boun...@elists.org] On
Behalf Of Francois PIETTE
Sent: Wednesday, March 24, 2010 12:50 PM
To: ICS support mailing
Subject: Re: [twsocket] UDP...

Using address 0.0.0.0 instruct TWSocket to listen on all the interfaces in 
the computer.
The alternative was to use only one of the IP adresses of the computer and 
then TWSocket would accepte connection originating only from that interface.
You cannot set an IP address of an external device and ask TWSocket to 
listen on it !

--
francois.pie...@overbyte.be
The author of the freeware multi-tier middleware MidWare
The author of the freeware Internet Component Suite (ICS)
http://www.overbyte.be

- Original Message - 
From: zayin za...@pdq.net
To: 'ICS support mailing' twsocket@elists.org
Sent: Wednesday, March 24, 2010 1:55 PM
Subject: Re: [twsocket] UDP...


 Hi,

 Thanks.

 I set the addr to 0.0.0.0, switched to SendTo and the reply was correct.

 Since I will be communicating with many of these external devices I wanted
 one TWSocket for each external device, that was why I set the addr field 
 to
 the external devices IP address. Using 0.0.0.0 it appears all the external
 devices will reply through that one TWSocket and I will need to sort them
 out in the OnDataAvaliable.

 Is that correct?

 Thanks,

 Mark

 -Original Message-
 From: twsocket-boun...@elists.org [mailto:twsocket-boun...@elists.org] On
 Behalf Of wilfried Mestdagh
 Sent: Wednesday, March 24, 2010 3:03 AM
 To: 'ICS support mailing'
 Subject: Re: [twsocket] UDP...

 Hi,

 WSocket1.Addr:='192.168.1.2';
 WSocket1.port:='9600';
 I get an error 10049.
 Means you cannot bind to that address. '192.168.1.2' is the address on the
 remote machine, you can not listen on that.

 The only difference I can see is the sending local port number is not
 9600.

 This should make no difference. You can set local port of course. There is

 a
 property for that.

 -- 
 mvg, Wilfried
 http://www.mestdagh.biz

 -Oorspronkelijk bericht-
 Van: twsocket-boun...@elists.org [mailto:twsocket-boun...@elists.org] 
 Namens
 zayin
 Verzonden: woensdag 24 maart 2010 1:12
 Aan: twsocket@elists.org
 Onderwerp: [twsocket] UDP...

 Hello,

 I ran into this a couple years ago and I found a work around so I dropped
 it. Now, new computer, new OS, new task. So, any reasons for my failure 
 that
 might have been computer/OS related are...

 I am using Wireshark to verify what I am seeing.

 Using D2007 and ICS version 5.25, UDP with TWSocket.

 When I call 'Listen' after setting:

 WSocket1.Addr:='192.168.1.2';
 WSocket1.port:='9600';

 I get an error 10049. Then of course if I send some bytes I get a 10057
 error.

 When I call 'Connect' after setting:

 WSocket1.Addr:='192.168.1.2';
 WSocket1.port:='9600';

 I can send the bytes and Wireshark shows them as transmitted and I get a
 reply from 192.168.1.2.

 The reply I get back indicates there is an error in the bytes. I KNOW the
 bytes are correct. The device also supports TCP with the same bytes and 
 when
 I use TCP all is good. I have other software, I did not create, and it 
 works
 with UDP using the same byte stream.

 The only difference I can see is the sending local port number is not 
 9600.
 I am not sure why that matters. The software that does work does have a
 local port number of 9600. And after hours, that is the only difference I
 can see.

 The source is below and I can upload a project if someone needs it.

 Any ideas? What am I missing?

 Ciao,

 Mark

 unit Main;

 interface

 uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, 
 Forms,
  Dialogs, StdCtrls, WSocket, IcsLogger;

 type
  TForm2 = class(TForm)
Memo1: TMemo;
WSocket1: TWSocket;
ListenStartBtn: TButton;
ListenStopBtn: TButton;
Label1: TLabel;
Label2: TLabel;
ConnectStartBtn: TButton;
StopConnectBtn: TButton;
IcsLogger1: TIcsLogger;
procedure ListenStartBtnClick(Sender: TObject);
procedure WSocket1Error(Sender: TObject);
procedure WSocket1SessionConnected(Sender: TObject; ErrCode: Word);
procedure WSocket1SessionClosed(Sender: TObject; ErrCode: Word);
procedure WSocket1DataAvailable(Sender: TObject; ErrCode: Word);
procedure ListenStopBtnClick(Sender: TObject);
procedure

Re: [twsocket] UDP...

2010-03-24 Thread zayin
Hi,

 What would be the reason(s) that I am not able to do the same thing with
 this new device? Error 10049 says I cannot bind to the remote address.

Because you call listen !

I am calling Connect.

Using UDP, I have another application, I set the addr property to the remote
IP address, set the port number, call connect, use send to transmit the
bytes and OnDataAvaliable to get the reply and all works fine.  

Now, different remote device, I do the same as the above paragraph and I get
error 10049 when I call connect. I am trying to understand what is causing
the error.

The remote device will not send me any data until I request it. So, I am not
sitting with a port listening for an incoming connection. 

What am I not understanding, in one device I can use UDP/Connect and it
works. Another device I get an error 10049 when I call connect.

I understand why I get the 10049 error on listen. Makes total since.

So, with UDP LocalAddr is not used.

Cheers,

Mark










-Original Message-
From: twsocket-boun...@elists.org [mailto:twsocket-boun...@elists.org] On
Behalf Of Francois PIETTE
Sent: Wednesday, March 24, 2010 1:49 PM
To: ICS support mailing
Subject: Re: [twsocket] UDP...

 ...originating only from that interface.

 I have done that kind of binding before using LocalAddr. I assume it would
 be the same property for UDP.

No, that is different. Actually a socket has two ends: one local and one 
remote. Each has his IP an port number. When you use a socket for listening 
incomming connection, the Addr property is used to specify the interface IP 
address which is used to accept incomming connections, 0.0.0.0 is a special 
case saying the socket to accept connections from any one of the interfaces 
installed in the computer. For an outgoing connection, the localaddr 
property is used to specific the interface to use for having the connection 
going out of the computer while the Addr property is used for the remote 
address.

 OK. I have another application where I am using UDP and I set the addr
 property to the remote IP address. Then I call connect, use send and
 OnDataAvaliable and all works fine.

This is an outgoing socket. That is different than listening. As I saif 
above, for an outgoing (client) socket, the addr property designated the 
remote address to conect to.
UDP is a special case where there is no real connection as you have with 
TCP. To have a universal interface in TWSocket, I use the connect method to 
bind the socket to the parameters given by the properties.


 What would be the reason(s) that I am not able to do the same thing with
 this new device? Error 10049 says I cannot bind to the remote address.

Because you call listen !

 What does the connect call, using UDP, send to the remote that
 caused the 10049 on one device and not others? I am so confused. ;)

Me too. I'm not sure I understand your description.

--
francois.pie...@overbyte.be
The author of the freeware multi-tier middleware MidWare
The author of the freeware Internet Component Suite (ICS)
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


[twsocket] UDP...

2010-03-23 Thread zayin
Hello,

I ran into this a couple years ago and I found a work around so I dropped
it. Now, new computer, new OS, new task. So, any reasons for my failure that
might have been computer/OS related are...

I am using Wireshark to verify what I am seeing.

Using D2007 and ICS version 5.25, UDP with TWSocket.

When I call 'Listen' after setting:

WSocket1.Addr:='192.168.1.2';
WSocket1.port:='9600';

I get an error 10049. Then of course if I send some bytes I get a 10057
error.

When I call 'Connect' after setting:

WSocket1.Addr:='192.168.1.2';
WSocket1.port:='9600';

I can send the bytes and Wireshark shows them as transmitted and I get a
reply from 192.168.1.2.

The reply I get back indicates there is an error in the bytes. I KNOW the
bytes are correct. The device also supports TCP with the same bytes and when
I use TCP all is good. I have other software, I did not create, and it works
with UDP using the same byte stream.

The only difference I can see is the sending local port number is not 9600.
I am not sure why that matters. The software that does work does have a
local port number of 9600. And after hours, that is the only difference I
can see.

The source is below and I can upload a project if someone needs it.

Any ideas? What am I missing?

Ciao,

Mark

unit Main;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, WSocket, IcsLogger;

type
  TForm2 = class(TForm)
Memo1: TMemo;
WSocket1: TWSocket;
ListenStartBtn: TButton;
ListenStopBtn: TButton;
Label1: TLabel;
Label2: TLabel;
ConnectStartBtn: TButton;
StopConnectBtn: TButton;
IcsLogger1: TIcsLogger;
procedure ListenStartBtnClick(Sender: TObject);
procedure WSocket1Error(Sender: TObject);
procedure WSocket1SessionConnected(Sender: TObject; ErrCode: Word);
procedure WSocket1SessionClosed(Sender: TObject; ErrCode: Word);
procedure WSocket1DataAvailable(Sender: TObject; ErrCode: Word);
procedure ListenStopBtnClick(Sender: TObject);
procedure ConnectStartBtnClick(Sender: TObject);
  private
holdingBuff:array [0..2048] of byte;
  public
{ Public declarations }
  end;

var
  Form2: TForm2;

implementation

{$R *.dfm}

var
 outBuffer:array [0..17] of byte =
($80,$00,$02,$00,$02,$00,$00,$04,$00,$03,$01,$01,$B0,$00,$00,$00,$00,$01);

procedure TForm2.ConnectStartBtnClick(Sender: TObject);
begin
 Memo1.Lines.Add('');
 Memo1.Lines.Add('ConnectStartBtnClick');
 WSocket1.Addr:='192.168.1.2';
 WSocket1.port:='9600';
 Memo1.Lines.Add('Connect');
 WSocket1.Connect;
 Memo1.Lines.Add('Send');
 WSocket1.Send(@outBuffer,18);
end;

procedure TForm2.ListenStartBtnClick(Sender: TObject);
begin
 Memo1.Lines.Add('');
 Memo1.Lines.Add('ListenStartBtnClick');
 WSocket1.Addr:='192.168.1.2';
 WSocket1.port:='9600';
 Memo1.Lines.Add('Listen');
 WSocket1.Listen;
 Memo1.Lines.Add('Send');
 WSocket1.Send(@outBuffer,18);
end;

procedure TForm2.ListenStopBtnClick(Sender: TObject);
begin
 Memo1.Lines.Add('Stop');
 WSocket1.Close;
end;

procedure TForm2.WSocket1DataAvailable(Sender: TObject; ErrCode: Word);
var
 byteCount:integer;
begin
 if (ErrCode  0) then
  Memo1.Lines.Add('WSocket1DataAvailable: ' + IntToStr(ErrCode));

 Memo1.Lines.Add('WSocket1DataAvailable');
 byteCount:=WSocket1.Receive(@holdingBuff[0],sizeOf(holdingBuff));
 if (byteCount  1) then
  Exit;
 Memo1.Lines.Add(IntToStr(byteCount));
end;

procedure TForm2.WSocket1Error(Sender: TObject);
begin
 Memo1.Lines.Add('WSocket1Error: ' + IntToStr(WSocket1.LastError));
end;

procedure TForm2.WSocket1SessionClosed(Sender: TObject; ErrCode: Word);
begin
 if (ErrCode  0) then
  Memo1.Lines.Add('WSocket1SessionClosed: ' + IntToStr(ErrCode));
 Memo1.Lines.Add('WSocket1SessionClosed');
end;

procedure TForm2.WSocket1SessionConnected(Sender: TObject; ErrCode: Word);
begin
 if (ErrCode  0) then
  Memo1.Lines.Add('WSocket1SessionConnected: ' + IntToStr(ErrCode));
 Memo1.Lines.Add('WSocket1SessionConnected');
end;

end.

DFM---

object Form2: TForm2
  Left = 758
  Top = -807
  Caption = 'Form2'
  ClientHeight = 714
  ClientWidth = 667
  Color = clBtnFace
  Font.Charset = DEFAULT_CHARSET
  Font.Color = clWindowText
  Font.Height = -11
  Font.Name = 'Tahoma'
  Font.Style = []
  OldCreateOrder = False
  PixelsPerInch = 96
  TextHeight = 13
  object Label1: TLabel
Left = 543
Top = 104
Width = 41
Height = 19
Caption = 'Listen'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -16
Font.Name = 'Tahoma'
Font.Style = []
ParentFont = False
  end
  object Label2: TLabel
Left = 543
Top = 232
Width = 57
Height = 19
Caption = 'Connect'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -16
Font.Name = 'Tahoma'
Font.Style = []
ParentFont = False
  end
  object Memo1: TMemo
Left = 8
Top = 8
Width = 529
Height = 689
ScrollBars = ssVertical
 

[twsocket] TWSocket...

2009-12-17 Thread zayin
Hi,

Thanks, that is what I thought. I wanted to have one TWSocket listen for a
connection from X and another listen for a connection from Y. But, I know
what I need to do.

Question 2: Can I call Connect from inside the OnSessionClosed event without
trouble?

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


[twsocket] TWSocket...

2009-12-16 Thread zayin

Hello,

Can I have 2 TWSocket components listen on the same port number and restrict
it by IP address?

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] TPop3Cli header...

2008-10-20 Thread zayin

No problem.

 If you have no control over the client...

Yeah, that is why I went with a message ID number in the body and
instructions in the user manual stating the replay must contain the
unaltered message id line.

Thanks for all your help.




On 10/20/2008 7:03:54 AM, DZ-Jay ([EMAIL PROTECTED]) wrote:
 I'm sorry, I think I mispoke.  I was actually thinking of SMTP
 server-to-server communication, which preserves headers; I'm
 not sure
 clietns would do that.  As a matter of fact, I have a suspicion they
 don't.  I'd try it anyway, just in case.
 
 However, the problem you have is not having control over the client;
 this is crucial.  If you have no control over the client, you cannot
 guarantee that a response or reply will contain any of the information
 you originally included in your message--headers or content.
 
 dZ.
 
 On Oct 20, 2008, at 05:41, DZ-Jay wrote:
 
 
  On Oct 19, 2008, at 08:09, zayin wrote:
  The person receiving the alarm will just need to reply to the email.
 
  If you include an X-Header when you send the message, the client will
  probably include it when replying, this is standard behaviour in most
  clients.
 
  So, it appears I might need to embed a unique string in the body of
  the
  message and use that to determine the responder.
 
  Use an X-Header.  Perform some tests: send a message with a new
  X-Header and reply from your mail client and see if it's there.  This
  may b

-- 
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] TPop3Cli header...

2008-10-19 Thread zayin

Hi,

Thanks to you both. Great information.

btw: Most email client allows you to see the message source. Just have a
look at a few messages you've received.

Yeah. I was worried I would release the program and some client would reply
with something different and then I would be in the position to support
20,000 variations.

My program sends the alarm but my program does not send the reply. I have no
control over that side. It could be a telephone with email that is replying.


The person receiving the alarm will just need to reply to the email.

So, it appears I might need to embed a unique string in the body of the
message and use that to determine the responder.

Ciao,

Mark

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of DZ-Jay
Sent: Sunday, October 19, 2008 7:36 AM
To: ICS support mailing
Subject: Re: [twsocket] TPop3Cli header...

Zayin,
Is the alarm being sent by your application?  If so, the best thing
to do (and what is commonly done) is for your application to create a new
header.  For example, you could create something like X-Alarm-Sender.

Although e-mail message headers have common standards, there is no
obligation to follow them, and there is really no technical restriction,
limitation, or enforcement at all, so any mail program is free to add any
header it wants to, or use none at all.  It just so happen that most mail
programs use the standard ones, but this is by convention.

Because of this, you can never be sure of any particular header to
be included or spelled in a specific way, but the message may still be
valid.  But if your applications are the ones that are sending and receiving
the messages, you can virtually guarantee the contents--this is why you
should invent a new header for your purposes.

Now, to answer your question:  The headers are typically in English.

The From and Received headers are used by mail clients around the world
to determine the sender, so the convention is to spell them as such, in
English, regardless of the nationality.

I hope this helps.
dZ.

On Oct 19, 2008, at 07:15, zayin wrote:


 Are the headers always in English?

 I need to search the header for the senders email address to 
 acknowledge the alarm. So, I am looking for a starting marker and 
 ending marker for the email address.

 Are 'From:' and 'Received:' always in English or will they be 
 translated to German if the pop3 server is in Germany?

-- 
DZ-Jay [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html

--
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] TPop3Cli header...

2008-10-18 Thread zayin
Hello,

Thanks for the response.

Will the 'From:' and 'Received:' lines always be the text for the lines. Or
will it be translated to X language?


Ciao,

Mark


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Francois PIETTE
Sent: Saturday, October 18, 2008 3:02 AM
To: ICS support mailing
Subject: Re: [twsocket] TPop3Cli header...

 I am using V5.

 This is all part of automated alarming logic.

 I need to verify that some user responded to an alarm email. I just 
 need to check the email address against a list.

 I see in the header the first line is Return-path: email address

 Will it be that format/language for all mail servers on the planet. :)

It is not the case. You may evan have no return-path at all.
You should better fook at the Fom: line.
By the way, the from line can easily be forged to anything.
You may also have a look at the Received: lines. There is one per hop
between sender and receiver. Note that tehre are some variations on what you
can find in the received: lines. The lines are in reverse order of hop
traversal. You should find your own ISP on the first line.

--
[EMAIL PROTECTED]
The author of the freeware multi-tier middleware MidWare
The author of the freeware Internet Component Suite (ICS)
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


[twsocket] TPop3Cli header...

2008-10-17 Thread zayin

Hello,

I am using V5.

This is all part of automated alarming logic.

I need to verify that some user responded to an alarm email. I just need to
check the email address against a list.

I see in the header the first line is Return-path: email address

Will it be that format/language for all mail servers on the planet. :) 

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

2008-07-22 Thread zayin

Thanks for the answer and the link. This has now become a bit easier task.

One last question. The PC has several network cards and the networks are
completely separate.

I need to handle datagrams from all networks. I have a  TWSocket with addr
set to 0.0.0.0 and localAddr is blank. I assume this will allow me to listen
on all networks.

I get the source address using ReceiveFrom and use SendTo to send the
response.

That all sound good?

Thanks,

Mark



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Francois PIETTE
Sent: Tuesday, July 22, 2008 3:13 AM
To: ICS support mailing
Subject: Re: [twsocket] UDP question...

 This is the first time I am writing a UDP server. The other UDP was a 
 client. It was fairly straight forward.

 As the server lets say I have 2 clients, A and B, that will be sending 
 me unsolicited data of 100 bytes per message.

 If I understand, when TWSocket.OnDataAvailable fires the data source 
 can be mixed.

 For example I could get 10 bytes from A, then 19 bytes from B, then 14 
 bytes from B and then 56 bytes from A, etc.
 And I might not get the hundred bytes. I might only get 45.


No, this is wrong. UDP is a datagram protocol. Datagram boundaries are
respected. If you send 100 bytes (in one call to Send of course), you'll
receive exactly 100 bytes in one call to Receive done from one
OnDataAvailable event.

There are a few things you must pay attention: TWSocket.BufSize must be
large enough for your larger datagram (It default to 1460 bytes); when
calling Receive or ReceiveFrom (to know who sent the packet), you must pass
a bufer larger enough; not all physical networks are able to send any
arbitrary large datagram. There is a limit imposed by each network.

This is totally diffrent for TCP which is a stream protocol.
For a complete description, see TCP/UDP primer document available from my
website.


--
[EMAIL PROTECTED]
The author of the freeware multi-tier middleware MidWare
The author of the freeware Internet Component Suite (ICS)
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


[twsocket] Guidance...

2008-07-12 Thread zayin

Hello,

I will be using the ICS HTTP Client for half of this task and thought since
you guys are masters in this area you would be the best place to turn for
guidance. If this is to OT then let me know.

I need to do a very simple thing, in my mind.

1. I need to have a web page hidden from all the search engines and if a
person does stumble on it they will not be able to view the source.
2. Using the ICS client post 3 numbers to the web page, have the web page
add the numbers and return the result in a reply.
3. Protect the code so a user can not download the code and set up a
mocked up web server.

On the server side I have PHP, Perl and Python available and I have never
used any of them and have no idea which would be best if one is needed.

This is part of a simple validation scheme. If my program finds the web page
and gets the correct result it allows the user to continue.

There might be a better solution, I thought this might be simple and
effective. Of course I could be totally wrong.

Any ideas, solutions, pointers would be appreciated,

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] HTTP...

2008-05-16 Thread zayin

Yes, it is for web browsers. The target is any and all with HTML only.

Thanks.

 

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Francois PIETTE
Sent: Friday, May 16, 2008 12:34 AM
To: ICS support mailing
Subject: Re: [twsocket] HTTP...

 I have a server and I want to send a jpeg to the client upon request. 
 This image is dynamic. I am using AnswerStream and that is all working
great.

 Then I decided I also wanted some text to go before the image.

 I could not determine how to send text and an image with the same reply.

 So, I imbed a link to the image in a img src= tag and that is all 
 working now.

 The client now has to make two round trips to get the complete page. 
 One for the text and one for the image.

 Is this the only method to accomplish this task?

If this is to display in a web browser, then yes it is the only method.
If you use HTTP as transport for your own application and you control both
client and server, then you can do whatever you like at server side and do
the reverse at client side.

Contribute to the SSL Effort. Visit http://www.overbyte.be/eng/ssl.html
--
[EMAIL PROTECTED]
The author of the freeware multi-tier middleware MidWare The author of the
freeware Internet Component Suite (ICS) 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


[twsocket] HTTP...

2008-05-15 Thread zayin

Hello,

I have a server and I want to send a jpeg to the client upon request. This
image is dynamic. I am using AnswerStream and that is all working great.

Then I decided I also wanted some text to go before the image. 

I could not determine how to send text and an image with the same reply.

So, I imbed a link to the image in a img src= tag and that is all working
now.

The client now has to make two round trips to get the complete page. One for
the text and one for the image.

Is this the only method to accomplish this task?


Thanks,

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] HTTP...

2008-05-15 Thread zayin

Thanks. I will look into it.

 

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of DZ-Jay
Sent: Thursday, May 15, 2008 3:15 PM
To: ICS support mailing
Subject: Re: [twsocket] HTTP...

DZ-Jay wrote:
 What you want to do is send a multi-part MIME payload in the body of 
 your HTTP response.  You have to set the content-type to 
 multipart/form-data.  For more information, check this page:
 
 http://www.w3.org/TR/html401/interact/forms.html#h-17.13.4.2
 
   dZ.
 

Please ignore this, it's only applicable to multi-part POST requests, not
responses.  A way to create a multi-part response is to encapsulate it as a
MIME 822 message.  Here's some basic information on this:

http://www.motobit.com/tips/detpg_multiple-files-one-request/

dZ.
--
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] THttpCli...

2008-05-11 Thread zayin

Hi,

ICS V5.

I am using an THttpCli and collecting  jpegs from a video camera.

I have found that sometimes the GetAsync fails because the complete document
is not sent and it always fails with the same byte count.

I am tracking the bytes received from the DocData event.

If the image is not received in X seconds I log all the information I can
think to but I am still not able to find the cause of the problem. Changing
the timeout does not change the failure.

I am not getting any exceptions. I have set up to catch BGExecption and it
never fires.

The content length various but the failure always is with the same number of
bytes received.

The text that follows shows successes and failures. The line
Watchdog*** is the failure. The
RequestDone Error = 3. Status = 404 that follows is my call to Abort.


Thanks for looking,

Mark


***GetAsync!
Location = http://192.168.1.240/goform/video
URL = http://192.168.1.240/goform/video
Document = video
Status = 200
Content Length =36906
Byte Rec = 36906
RequestDone, no error. Status = 200
***GetAsync!
Location = http://192.168.1.240/goform/video
URL = http://192.168.1.240/goform/video
Document = video
Status = 200
Content Length =37580
Byte Rec = 37580
RequestDone, no error. Status = 200
***GetAsync!
Location = http://192.168.1.240/goform/video
URL = http://192.168.1.240/goform/video
Document = video
Status = 200
Content Length =37035
Byte Rec = 37035
RequestDone, no error. Status = 200
***GetAsync!
Location = http://192.168.1.240/goform/video
URL = http://192.168.1.240/goform/video
Document = video
Status = 200
Content Length =37441
Byte Rec = 37441
RequestDone, no error. Status = 200
***GetAsync!
Location = http://192.168.1.240/goform/video
URL = http://192.168.1.240/goform/video
Document = video
Status = 200
Content Length =37938
Byte Rec = 37938
RequestDone, no error. Status = 200
***GetAsync!
Location = http://192.168.1.240/goform/video
URL = http://192.168.1.240/goform/video
Document = video
Status = 200
Content Length =37470
Byte Rec = 37470
RequestDone, no error. Status = 200
***GetAsync!
Location = http://192.168.1.240/goform/video
URL = http://192.168.1.240/goform/video
Document = video
Status = 200
Content Length =37787
Byte Rec = 37787
RequestDone, no error. Status = 200
***GetAsync!
Location = http://192.168.1.240/goform/video
URL = http://192.168.1.240/goform/video
Document = video
Status = 200
Content Length =38088
Watchdog***
LastResponse= 
Status = 200
Byte Rec = 37960
RequestDone Error = 3. Status = 404
***GetAsync!
Location = http://192.168.1.240/goform/video
URL = http://192.168.1.240/goform/video
Document = video
Status = 200
Content Length =38108
Byte Rec = 38108
RequestDone, no error. Status = 200
***GetAsync!
Location = http://192.168.1.240/goform/video
URL = http://192.168.1.240/goform/video
Document = video
Status = 200
Content Length =37099
Byte Rec = 37099
RequestDone, no error. Status = 200
***GetAsync!
Location = http://192.168.1.240/goform/video
URL = http://192.168.1.240/goform/video
Document = video
Status = 200
Content Length =37960
Byte Rec = 37960
RequestDone, no error. Status = 200
***GetAsync!
Location = http://192.168.1.240/goform/video
URL = http://192.168.1.240/goform/video
Document = video
Status = 200
Content Length =37917
Byte Rec = 37917
RequestDone, no error. Status = 200
***GetAsync!
Location = http://192.168.1.240/goform/video
URL = http://192.168.1.240/goform/video
Document = video
Status = 200
Content Length =37466
Byte Rec = 37466
RequestDone, no error. Status = 200
***GetAsync!
Location = http://192.168.1.240/goform/video
URL = http://192.168.1.240/goform/video
Document = video
Status = 200
Content Length =37666
Byte Rec = 37666
RequestDone, no error. Status = 200
***GetAsync!
Location = http://192.168.1.240/goform/video
URL = http://192.168.1.240/goform/video
Document = video
Status = 200
Content Length =37500
Byte Rec = 37500
RequestDone, no error. Status = 200
***GetAsync!
Location = http://192.168.1.240/goform/video
URL = http://192.168.1.240/goform/video
Document = video
Status = 200
Content Length =37960
Byte Rec = 37960
RequestDone, no error. Status = 200
***GetAsync!
Location = http://192.168.1.240/goform/video
URL = http://192.168.1.240/goform/video
Document = video
Status = 200
Content Length =37362
Byte Rec = 37362
RequestDone, no error. Status = 200
***GetAsync!
Location = http://192.168.1.240/goform/video
URL = http://192.168.1.240/goform/video
Document = video
Status = 200
Content Length =37788
Byte Rec = 37788
RequestDone, no error. Status = 200
***GetAsync!
Location = http://192.168.1.240/goform/video
URL = http://192.168.1.240/goform/video
Document = video
Status = 200
Content Length =37599
Byte Rec = 37599
RequestDone, no error. Status = 200
***GetAsync!
Location = http://192.168.1.240/goform/video
URL = http://192.168.1.240/goform/video
Document = video
Status = 200
Content Length =38030

Re: [twsocket] THttpCli...

2008-05-11 Thread zayin

Hello,

Thanks for the link. Watching the debug window most of the time it works
like clock work. Sometimes I see the content length and then it pauses and
then indicates finished and starts again. So, there is a watchdog timer but
its firing is not logged.

I set the frequency to 1 sec, the lowest, and the pause is about 5 seconds.

Ciao,

Mark




-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Angus Robertson - Magenta Systems Ltd
Sent: Sunday, May 11, 2008 8:07 AM
To: twsocket@elists.org
Subject: Re: [twsocket] THttpCli...

 I am using an THttpCli and collecting  jpegs from a video camera.
 I have found that sometimes the GetAsync fails because the complete 
 document is not sent and it always fails with the same byte count.

Try using my CamCollect application, it does exactly the same thing using
ICS V5, see if you get the same problem, it also logs the protocol: 

http://www.magsys.co.uk/camcollect/ccbeta.asp

Angus

--
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] THttpCli...

2008-05-11 Thread zayin
Hello,

Are you referring here to CamCollect or your own application?
 
CamCollect

I spent hours last night attempting to locate the problem. I went so far as
to cycle power on the camera, reset to defaults, and cycle power on my
computer, to no resolution.

This morning/afternoon I can not get it to fail. I had it running for 3+
hours and not one hiccup. It is running now in the background and working
flawless.

The only hardware I did not cycle power on is the router.

For Francois P., I am not calling any message pump calls, etc.. Most of my
ICS callbacks are very short and post a message. 

For now, I will keep on the motion detection path I am on and be watchful
for the error again.

Thank guys,

Mark





-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Angus Robertson - Magenta Systems Ltd
Sent: Sunday, May 11, 2008 1:19 PM
To: twsocket@elists.org
Subject: Re: [twsocket] THttpCli...

 Thanks for the link. Watching the debug window most of the time it 
 works like clock work. Sometimes I see the content length and then it 
 pauses and then indicates finished and starts again. So, there is a 
 watchdog timer but its firing is not logged.

Are you referring here to CamCollect or your own application?

CamCollect does have a download timeout to cope with a slow internet, but if
you are seeing the same problem in CamCollect as your own application, it
suggests the IP camera is at fault. 

Angus

--
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] Post command...

2008-04-14 Thread zayin
Hi,

This all has to be done in HTML only.

This is my first HTML programming task so, I do not know how to make the
command from an invisible frame or layer.

This is the page.

 AnswerString(Flags,
  '',   { Default Status '200 OK' }
  '',   { Default Content-Type: text/html }
  '',   { Default header  }
  'HTML' +
   'HEAD' +
'TITLE' + TitleString + '/TITLE' +
   '/HEAD' +
   'BODY style=background:' + serverHTMLBGColor + '' +
   'form action=AC method=post' +   //accept command action
'pTag:' + tagName + ' ' + cBackButton + '/p' +
'pHigh Limit: ' + highEU + '/p' +
'pLow Limit: ' + lowEU + '/p' +
'input name=Tagname type=hidden value=' + tagname + '/' +
'input name=ItemID type=hidden value=' + itemIDString + '/' +
'input name=UserValue type=text value=' + currentValue + '/br/' +
'input name=AcceptBtn type=submit value=Accept/' +
   '/form' +
  '/HTML');

Can you advise?

Thanks,

Mark




-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Francois Piette
Sent: Monday, April 14, 2008 2:33 AM
To: ICS support mailing
Subject: Re: [twsocket] Post command...

 This is all plain HTML without any additions.

 I receive an HTML submit command and I am handling it the onPostData 
 callback and all is well. I parse the data do the internal calls and 
 life
is
 good.

 I have one issue. I do not know what to answer. I do not want the 
 browser page to change or move to another page or really do anything. 
 I just need
to
 send an acknowledgement and I do not know how.

 Without the acknowledgement the browser sits waiting.

This is a client side issue.
Any command sent by the browser needs a reply.
If you don't want to have the displayed page changed by the reply, make the
command from an invisible frame or layer, or from JavaScript using the
xmlHttpRequest object.

Contribute to the SSL Effort. Visit http://www.overbyte.be/eng/ssl.html
--
[EMAIL PROTECTED]
Author of ICS (Internet Component Suite, freeware) Author of MidWare
(Multi-tier framework, freeware) 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] Post command...

2008-04-14 Thread zayin

Hello,

This has to run on every browser on every platform known to mankind. 

The consideration was sticking only to HTML reduces the risk of future
problems.

Ciao,

Mark


  

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Francois Piette
Sent: Monday, April 14, 2008 9:54 AM
To: ICS support mailing
Subject: Re: [twsocket] Post command...

 This all has to be done in HTML only.

Please explain why you can't use JavaScript.

--
[EMAIL PROTECTED]
Author of ICS (Internet Component Suite, freeware) Author of MidWare
(Multi-tier framework, freeware) http://www.overbyte.be

- Original Message -
From: zayin [EMAIL PROTECTED]
To: 'ICS support mailing' twsocket@elists.org
Sent: Monday, April 14, 2008 4:09 PM
Subject: Re: [twsocket] Post command...


 Hi,

 This all has to be done in HTML only.

 This is my first HTML programming task so, I do not know how to make the
 command from an invisible frame or layer.

 This is the page.

  AnswerString(Flags,
   '',   { Default Status '200 OK' }
   '',   { Default Content-Type: text/html }
   '',   { Default header  }
   'HTML' +
'HEAD' +
 'TITLE' + TitleString + '/TITLE' +
'/HEAD' +
'BODY style=background:' + serverHTMLBGColor + '' +
'form action=AC method=post' +   //accept command action
 'pTag:' + tagName + ' ' + cBackButton + '/p' +
 'pHigh Limit: ' + highEU + '/p' +
 'pLow Limit: ' + lowEU + '/p' +
 'input name=Tagname type=hidden value=' + tagname + '/' +
 'input name=ItemID type=hidden value=' + itemIDString + '/' +
 'input name=UserValue type=text value=' + currentValue + '/br/'
+
 'input name=AcceptBtn type=submit value=Accept/' +
'/form' +
   '/HTML');

 Can you advise?

 Thanks,

 Mark




 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
 Behalf Of Francois Piette
 Sent: Monday, April 14, 2008 2:33 AM
 To: ICS support mailing
 Subject: Re: [twsocket] Post command...

  This is all plain HTML without any additions.
 
  I receive an HTML submit command and I am handling it the onPostData
  callback and all is well. I parse the data do the internal calls and
  life
 is
  good.
 
  I have one issue. I do not know what to answer. I do not want the
  browser page to change or move to another page or really do anything.
  I just need
 to
  send an acknowledgement and I do not know how.
 
  Without the acknowledgement the browser sits waiting.

 This is a client side issue.
 Any command sent by the browser needs a reply.
 If you don't want to have the displayed page changed by the reply, make
the
 command from an invisible frame or layer, or from JavaScript using the
 xmlHttpRequest object.

 Contribute to the SSL Effort. Visit http://www.overbyte.be/eng/ssl.html
 --
 [EMAIL PROTECTED]
 Author of ICS (Internet Component Suite, freeware) Author of MidWare
 (Multi-tier framework, freeware) 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] Post command...

2008-04-14 Thread zayin
Hi,

Thanks for the information. 

What I am looking to do is just stop the client browser from waiting. I do
not want to change the page. 

In the two environments I am testing in, at present, IE and Mozilla, after
the user presses the accept button the browser waits for a reply. With IE
the tabsheet title shows a spinning circle. With Mozilla it sets the cursor
to the pointer+hourglass.

After the HandlePostedData I do not know what to send to handle the client
so the client stop this wait mode.

Ciao,

Mark

 

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of [EMAIL PROTECTED]
Sent: Monday, April 14, 2008 10:54 AM
To: twsocket@elists.org
Subject: Re: [twsocket] Post command...

Mark,
If what you want is to let the user know that processing has
completed, what you need to do is quite simple, old school CGI processing:
You change the rendered output to reflect the results of processing.

After finishing processing, change a variable, say, resultString,
and display it in the rendered output.  You can have something like:

// Notice the call to GetResultString() to inject server output.
 AnswerString(Flags,
  '',   { Default Status '200 OK' }
  '',   { Default Content-Type: text/html }
  '',   { Default header  }
  'HTML' +
   'HEAD' +
'TITLE' + TitleString + '/TITLE' +
   '/HEAD' +
   'BODY style=background:' + serverHTMLBGColor + '' +
   GetResultString(resultString) +
   'form action=AC method=post' +  
//accept command action
'pTag:' + tagName + ' ' + cBackButton + '/p' +
'pHigh Limit: ' + highEU + '/p' +
'pLow Limit: ' + lowEU + '/p' +
'input name=Tagname type=hidden value=' + tagname + '/' +
'input name=ItemID type=hidden value=' + itemIDString + '/' +
'input name=UserValue type=text value=' + currentValue + '/br/' +
'input name=AcceptBtn type=submit
value=Accept/' +
   '/form' +
  '/HTML');

// ---

Function GetResultString(str: String): String Begin
If (str  '') Then
Result := 'Server Responded: '+ str
Else
Result := '';
End If
End;

// -- END

When the page is first rendered, the
GetResultString() function will return an empty string because the
resultString hasn't been set.  And when the data is posted and processed, it
will display the new string.

This is pretty much how more complex and sophisticated frameworks, like
ASP.NET, Java-Struts, and PHP handle dynamically generated pages.

What Francois was offering was a more modern and popular approach, usually
called AJAX, where your web page sends requests to the server on a separate
channel, using JavaScript, then parses the output, and dynamically changes
the document displayed.  It does the same thing without refreshing the
entire document.  However, as you stated, this may not work in exactly the
same way on every browser, and depends too much on client-side processing,
which is prone to errors and abuse.

-dZ.

zayin wrote:
 Hi,
 
 This all has to be done in HTML only.
 
 This is my first HTML programming task so, I do not
know how to make the
 command from an invisible frame or layer.
 
 This is the page.
 
  AnswerString(Flags,
   '',   { Default Status '200 OK' }
   '',   { Default Content-Type: text/html }
   '',   { Default header  }
   'HTML' +
'HEAD' +
 'TITLE' + TitleString + '/TITLE' +
'/HEAD' +
'BODY style=background:' + serverHTMLBGColor +
'' +
'form action=AC method=post' +  
//accept command action
 'pTag:' + tagName + ' ' + cBackButton + '/p' +
 'pHigh Limit: ' + highEU + '/p' +
 'pLow Limit: ' + lowEU + '/p' +
 'input name=Tagname type=hidden value=' +
tagname + '/' +
 'input name=ItemID type=hidden value=' +
itemIDString + '/' +
 'input name=UserValue type=text value=' +
currentValue + '/br/' +
 'input name=AcceptBtn type=submit
value=Accept/' +
'/form' +
   '/HTML');
 
 Can you advise?



--
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] Post command...

2008-04-14 Thread zayin
Hello,

Thanks for the response.

Yes, I understand the interaction. 

I do not know enough about all the HTML codes to know if I am missing some.
Like refresh current page or reload or simple acknowledge do nothing.

It appears that the only solution is to just retransmit the complete page
after the button is pressed.

Yes?

Thanks,

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] Post command...

2008-04-14 Thread zayin

Hi dZ,

Thanks for the information.

Ciao,

Mark

 

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of [EMAIL PROTECTED]
Sent: Monday, April 14, 2008 12:29 PM
To: twsocket@elists.org
Subject: Re: [twsocket] Post command...

zayin wrote:
 I do not know enough about all the HTML codes to
know if I am missing some.
 Like refresh current page or reload or simple
acknowledge do nothing.

There are no such responses.  The response codes are typically status codes
as a result of the request (error, success, file-not-found,
file-found-somewhere-else, etc.).  In your case, a successful processing
should reply with 200, which means success.  However, this is only the
response header, you still need the body.  If you leave it blank, the
browser will just display a blank page, which is even worse.

 It appears that the only solution is to just
retransmit the complete page
 after the button is pressed.

This is the quick solution.  Since the protocol is stateless, there is
really no way to say Success, now reload the page -- the browser needs to
*give* the client the page to reload it.

The alternative is to do it in JavaScript, which may be more difficult.

-dZ.



--
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] Post command...

2008-04-13 Thread zayin

Hello,

This is all plain HTML without any additions.

I receive an HTML submit command and I am handling it the onPostData
callback and all is well. I parse the data do the internal calls and life is
good.

I have one issue. I do not know what to answer. I do not want the browser
page to change or move to another page or really do anything. I just need to
send an acknowledgement and I do not know how.

Without the acknowledgement the browser sits waiting.

Ideas?

Thanks,

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


Re: [twsocket] IP Camera

2008-03-18 Thread zayin

For anyone interested in the IP Camera quest.

It is a SkpyIPCam310.

I ended up using GetASync with http://address/goform/video.

Thanks to all who commented.

Mark

  

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Éric Fleming Bonilha
Sent: Friday, March 14, 2008 12:07 PM
To: ICS support mailing
Subject: Re: [twsocket] IP Camera

Hi Mark,

Actually the Digifort architecture is very complex because we need to have
compatibility with a lot of different IP cameras (We have now support for
250 different models) and we support a lot of streaming protocols, but the
base concept is simple.

Do you want to grab images from what IP Camera? What is the model? JPEG or
MPEG-4 streaming?

Éric

- Original Message -
From: zayin [EMAIL PROTECTED]
To: 'ICS support mailing' twsocket@elists.org
Sent: Friday, March 14, 2008 1:09 PM
Subject: Re: [twsocket] IP Camera



Hi Éric,

Very cool.

Would you have a small bit of demo source code for getting the image from
the camera you would like to share?

Thanks,

Mark



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Éric Fleming Bonilha
Sent: Friday, March 14, 2008 11:03 AM
To: ICS support mailing
Subject: Re: [twsocket] IP Camera

Hello Mark

My software Digifort www.digifort.com.br is all written in Delphi / ICS

Éric
- Original Message -
From: zayin [EMAIL PROTECTED]
To: 'ICS support mailing' twsocket@elists.org
Sent: Friday, March 14, 2008 12:49 PM
Subject: [twsocket] IP Camera



 Hi,

 Has anyone done any work with getting data/images from IP cameras using
 ICS?
 Seems to be a series of JPGs are sent from the camera.

 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


[twsocket] IP Camera

2008-03-14 Thread zayin

Hi,

Has anyone done any work with getting data/images from IP cameras using ICS?
Seems to be a series of JPGs are sent from the camera.

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] IP Camera

2008-03-14 Thread zayin

Hi Éric,

Very cool. 

Would you have a small bit of demo source code for getting the image from
the camera you would like to share?

Thanks,

Mark

 

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Éric Fleming Bonilha
Sent: Friday, March 14, 2008 11:03 AM
To: ICS support mailing
Subject: Re: [twsocket] IP Camera

Hello Mark

My software Digifort www.digifort.com.br is all written in Delphi / ICS

Éric
- Original Message -
From: zayin [EMAIL PROTECTED]
To: 'ICS support mailing' twsocket@elists.org
Sent: Friday, March 14, 2008 12:49 PM
Subject: [twsocket] IP Camera



 Hi,

 Has anyone done any work with getting data/images from IP cameras using 
 ICS?
 Seems to be a series of JPGs are sent from the camera.

 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

-- 
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] IP Camera

2008-03-14 Thread zayin
Hi Éric,

The camera is a AirLink101.

Ciao,

Mark



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Éric Fleming Bonilha
Sent: Friday, March 14, 2008 12:07 PM
To: ICS support mailing
Subject: Re: [twsocket] IP Camera

Hi Mark,

Actually the Digifort architecture is very complex because we need to have
compatibility with a lot of different IP cameras (We have now support for
250 different models) and we support a lot of streaming protocols, but the
base concept is simple.

Do you want to grab images from what IP Camera? What is the model? JPEG or
MPEG-4 streaming?

Éric

- Original Message -
From: zayin [EMAIL PROTECTED]
To: 'ICS support mailing' twsocket@elists.org
Sent: Friday, March 14, 2008 1:09 PM
Subject: Re: [twsocket] IP Camera



Hi Éric,

Very cool.

Would you have a small bit of demo source code for getting the image from
the camera you would like to share?

Thanks,

Mark



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Éric Fleming Bonilha
Sent: Friday, March 14, 2008 11:03 AM
To: ICS support mailing
Subject: Re: [twsocket] IP Camera

Hello Mark

My software Digifort www.digifort.com.br is all written in Delphi / ICS

Éric
- Original Message -
From: zayin [EMAIL PROTECTED]
To: 'ICS support mailing' twsocket@elists.org
Sent: Friday, March 14, 2008 12:49 PM
Subject: [twsocket] IP Camera



 Hi,

 Has anyone done any work with getting data/images from IP cameras using
 ICS?
 Seems to be a series of JPGs are sent from the camera.

 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

-- 
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] IP Camera

2008-03-14 Thread zayin
Hi,

It does support HTTP.

I have been playing with it. I no nothing about HTTP. I use ICS in raw form.
;)

Connecting to it and using http://192.168.1.240/view.asp I get:

 HTTP/1.1 401 Unauthorized
Server: GoAhead-Webs
Date: Thu Jan  1 02:09:50 2004
WWW-Authenticate: Basic realm=CameraServer
Pragma: no-cache
Cache-Control: no-cache
Content-Type: text/html


Using '/VIDEO.CGI' to video stream or '/IMAGE.JPG'  I get 404.


Ciao,

Mark

 

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Éric Fleming Bonilha
Sent: Friday, March 14, 2008 1:45 PM
To: ICS support mailing
Subject: Re: [twsocket] IP Camera

Mark,

This camera is MJPEG but if I´m not wrog this is an OEM product of the
manufacturer Cellvistion

This camera don´t use HTTP protocol so the THTTPCli will not work with it...

Instead you will have to communicate by hand using the tsocket component,
the problem is the protocol to communicate with the camera but as I remember
from this camera you just have to connect to it (on the video port) and send
the string '0110' to request one JPEG image.
Cellvision has different protocol, on newer cameras they also support HTTP
transmission by '/VIDEO.CGI' to video stream or '/IMAGE.JPG' for still
images... for example: http://192.168.0.100/IMAGE.JPG Try this test... if
you can download the image on your browser using this address so you will be
able to use THTTPCli component to download still images, to download video
stream using VIDEO.CGI you will have to parse the images

Éric

- Original Message -
From: zayin [EMAIL PROTECTED]
To: 'ICS support mailing' twsocket@elists.org
Sent: Friday, March 14, 2008 2:25 PM
Subject: Re: [twsocket] IP Camera


Hi Éric,

The camera is a AirLink101.

Ciao,

Mark



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Éric Fleming Bonilha
Sent: Friday, March 14, 2008 12:07 PM
To: ICS support mailing
Subject: Re: [twsocket] IP Camera

Hi Mark,

Actually the Digifort architecture is very complex because we need to have
compatibility with a lot of different IP cameras (We have now support for
250 different models) and we support a lot of streaming protocols, but the
base concept is simple.

Do you want to grab images from what IP Camera? What is the model? JPEG or
MPEG-4 streaming?

Éric

- Original Message -
From: zayin [EMAIL PROTECTED]
To: 'ICS support mailing' twsocket@elists.org
Sent: Friday, March 14, 2008 1:09 PM
Subject: Re: [twsocket] IP Camera



Hi Éric,

Very cool.

Would you have a small bit of demo source code for getting the image from
the camera you would like to share?

Thanks,

Mark



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Éric Fleming Bonilha
Sent: Friday, March 14, 2008 11:03 AM
To: ICS support mailing
Subject: Re: [twsocket] IP Camera

Hello Mark

My software Digifort www.digifort.com.br is all written in Delphi / ICS

Éric
- Original Message -
From: zayin [EMAIL PROTECTED]
To: 'ICS support mailing' twsocket@elists.org
Sent: Friday, March 14, 2008 12:49 PM
Subject: [twsocket] IP Camera



 Hi,

 Has anyone done any work with getting data/images from IP cameras using
 ICS?
 Seems to be a series of JPGs are sent from the camera.

 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

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

-- 
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] IP Camera

2008-03-14 Thread zayin

And I do not read what I type

I no nothing about HTTP. 

HA!

I know nothing about HTTP.

 

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of zayin
Sent: Friday, March 14, 2008 4:18 PM
To: 'ICS support mailing'
Subject: Re: [twsocket] IP Camera

Hi,

It does support HTTP.

I have been playing with it. I no nothing about HTTP. I use ICS in raw form.
;)

Connecting to it and using http://192.168.1.240/view.asp I get:

 HTTP/1.1 401 Unauthorized
Server: GoAhead-Webs
Date: Thu Jan  1 02:09:50 2004
WWW-Authenticate: Basic realm=CameraServer
Pragma: no-cache
Cache-Control: no-cache
Content-Type: text/html


Using '/VIDEO.CGI' to video stream or '/IMAGE.JPG'  I get 404.


Ciao,

Mark

 

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Éric Fleming Bonilha
Sent: Friday, March 14, 2008 1:45 PM
To: ICS support mailing
Subject: Re: [twsocket] IP Camera

Mark,

This camera is MJPEG but if I´m not wrog this is an OEM product of the
manufacturer Cellvistion

This camera don´t use HTTP protocol so the THTTPCli will not work with it...

Instead you will have to communicate by hand using the tsocket component,
the problem is the protocol to communicate with the camera but as I remember
from this camera you just have to connect to it (on the video port) and send
the string '0110' to request one JPEG image.
Cellvision has different protocol, on newer cameras they also support HTTP
transmission by '/VIDEO.CGI' to video stream or '/IMAGE.JPG' for still
images... for example: http://192.168.0.100/IMAGE.JPG Try this test... if
you can download the image on your browser using this address so you will be
able to use THTTPCli component to download still images, to download video
stream using VIDEO.CGI you will have to parse the images

Éric

- Original Message -
From: zayin [EMAIL PROTECTED]
To: 'ICS support mailing' twsocket@elists.org
Sent: Friday, March 14, 2008 2:25 PM
Subject: Re: [twsocket] IP Camera


Hi Éric,

The camera is a AirLink101.

Ciao,

Mark



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Éric Fleming Bonilha
Sent: Friday, March 14, 2008 12:07 PM
To: ICS support mailing
Subject: Re: [twsocket] IP Camera

Hi Mark,

Actually the Digifort architecture is very complex because we need to have
compatibility with a lot of different IP cameras (We have now support for
250 different models) and we support a lot of streaming protocols, but the
base concept is simple.

Do you want to grab images from what IP Camera? What is the model? JPEG or
MPEG-4 streaming?

Éric

- Original Message -
From: zayin [EMAIL PROTECTED]
To: 'ICS support mailing' twsocket@elists.org
Sent: Friday, March 14, 2008 1:09 PM
Subject: Re: [twsocket] IP Camera



Hi Éric,

Very cool.

Would you have a small bit of demo source code for getting the image from
the camera you would like to share?

Thanks,

Mark



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Éric Fleming Bonilha
Sent: Friday, March 14, 2008 11:03 AM
To: ICS support mailing
Subject: Re: [twsocket] IP Camera

Hello Mark

My software Digifort www.digifort.com.br is all written in Delphi / ICS

Éric
- Original Message -
From: zayin [EMAIL PROTECTED]
To: 'ICS support mailing' twsocket@elists.org
Sent: Friday, March 14, 2008 12:49 PM
Subject: [twsocket] IP Camera



 Hi,

 Has anyone done any work with getting data/images from IP cameras 
 using ICS?
 Seems to be a series of JPGs are sent from the camera.

 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

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

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

Re: [twsocket] IP Camera

2008-03-14 Thread zayin

I assume you intended to be of help.

As I said I KNOW nothing about HTTP.

Using the HttpTest as suggested it does return a page.

I know from using a browser what the page looks like.

I see this in the returned html:

IMG SRC=/goform/capture?1072958775622285 align=center

This is the picture.

So, without logging, on I should be able to get successive jpegs from the
camera I am just unsure of how.

Thanks

Mark

 

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Angus Robertson - Magenta Systems Ltd
Sent: Friday, March 14, 2008 7:45 PM
To: twsocket@elists.org
Subject: Re: [twsocket] IP Camera

 I have been playing with it. I no nothing about HTTP. I use ICS in raw 
 form.
 Connecting to it and using http://192.168.1.240/view.asp I get:
 
  HTTP/1.1 401 Unauthorized

Which means what it says, give it a logon name and password and it should
give you a picture or menu or something. 

Angus
--
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] IP Camera

2008-03-14 Thread zayin

Just a quick update.

It appears using: 192.168.1.240/goform/capture for this camera, which is a
SkyIPCam310, will collect the image as a jpeg.

The box label has MJPEG which I have not determined how to get the camera to
send the image without requesting each time.

Thanks for the suggestion. Using HttpTest to see what was received was the
first big break.

Ciao,

Mark

 

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Francois PIETTE
Sent: Friday, March 14, 2008 12:01 PM
To: ICS support mailing
Subject: Re: [twsocket] IP Camera

 Has anyone done any work with getting data/images from IP cameras 
 using ICS?
 Seems to be a series of JPGs are sent from the camera.

You probably simply need to use the HTTP client component to get the jpeg
images.
Only a few lines is needed to download a jpeg file.
See HttpTst sample program delivered with ICS.

--
[EMAIL PROTECTED]
The author of the freeware multi-tier middleware MidWare The author of the
freeware Internet Component Suite (ICS) 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


[twsocket] Memory leak...

2008-01-07 Thread zayin

Hello,

tcpPort: TWSocket;

tcpPort.Connect

AQTime is reporting a memory leak after I call connect.

Has anyone run into this issue?

D2007 SP3 XP Pro SP3

5.25 is in the WSocket file.


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] Memory leak...

2008-01-07 Thread zayin

Sorry, I have not seen a reply!

Where is the archive?

 

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Fastream Technologies
Sent: Monday, January 07, 2008 8:44 AM
To: ICS support mailing
Subject: Re: [twsocket] Memory leak...

Wifried had already replied to your initial message!

SZ


On 1/7/08, zayin [EMAIL PROTECTED] wrote:


 Hello,

 tcpPort: TWSocket;

 tcpPort.Connect

 AQTime is reporting a memory leak after I call connect.

 Has anyone run into this issue?

 D2007 SP3 XP Pro SP3

 5.25 is in the WSocket file.


 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


Re: [twsocket] Memory leak...

2008-01-07 Thread zayin
 
Hello Wilfried ,

I located the archive and I see his response.

The leak is reported at program termination not during normal execution.



Mark


-Original Message-
From: zayin [mailto:[EMAIL PROTECTED] 
Sent: Monday, January 07, 2008 8:46 AM
To: 'ICS support mailing'
Subject: RE: [twsocket] Memory leak...


Sorry, I have not seen a reply!

Where is the archive?

 

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Fastream Technologies
Sent: Monday, January 07, 2008 8:44 AM
To: ICS support mailing
Subject: Re: [twsocket] Memory leak...

Wifried had already replied to your initial message!

SZ


On 1/7/08, zayin [EMAIL PROTECTED] wrote:


 Hello,

 tcpPort: TWSocket;

 tcpPort.Connect

 AQTime is reporting a memory leak after I call connect.

 Has anyone run into this issue?

 D2007 SP3 XP Pro SP3

 5.25 is in the WSocket file.


 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


Re: [twsocket] Memory leaks...

2008-01-07 Thread zayin
Hi,

The TWSocket is on a TDataModule. I am creating the TDataModule and yes I am
freeing it. If I was not freeing the TDataModule it would be reported as a
leak, along with the other items on the TDataModule.

I have not made a test case that just has a TDataModule with a TWSocket.

Are you using AQTime?

Thanks for the response,

Mark



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of DZ-Jay
Sent: Monday, January 07, 2008 10:53 AM
To: ICS support mailing
Subject: Re: [twsocket] Memory leaks...


On Jan 7, 2008, at 11:45, zayin wrote:

 I located the archive and I see his response.

 The leak is reported at program termination not during normal 
 execution.

Are you creating the class object yourself, and if so, are you sure it is
being destroyed?  Can you offer some code?

dZ.

P.S. Do not send a new question as a reply to a message with a different
topic -- always start a new topic.  Most mail programs will thread the
messages by ID and they may not be visible to some users.  
For example, your past messages seem to have come in as replies to the smtp
component not ready thread.

-- 
DZ-Jay [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html

--
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] Memory leaks...

2008-01-07 Thread zayin
Hello,

Sorry for the trouble.

I just fixed an error in another part of the program, a call to a driver,
having nothing to do with the TWSocket or really anything related to it, and
AQTime reports only one leak of 4096 bytes. This one I have no idea what it
is. It appears to be from MakeObjectInstance on TApplication.Create.

I just switched from SleuthQA to AQtime. AQtime seems pretty good so far.
There are many more features and the learning curve is OK.
 
Thanks for all your patience.

Ciao,

Mark

  

-Original Message-
From: zayin [mailto:[EMAIL PROTECTED] 
Sent: Monday, January 07, 2008 11:10 AM
To: 'ICS support mailing'
Subject: RE: [twsocket] Memory leaks...

Hi,

The TWSocket is on a TDataModule. I am creating the TDataModule and yes I am
freeing it. If I was not freeing the TDataModule it would be reported as a
leak, along with the other items on the TDataModule.

I have not made a test case that just has a TDataModule with a TWSocket.

Are you using AQTime?

Thanks for the response,

Mark



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of DZ-Jay
Sent: Monday, January 07, 2008 10:53 AM
To: ICS support mailing
Subject: Re: [twsocket] Memory leaks...


On Jan 7, 2008, at 11:45, zayin wrote:

 I located the archive and I see his response.

 The leak is reported at program termination not during normal 
 execution.

Are you creating the class object yourself, and if so, are you sure it is
being destroyed?  Can you offer some code?

dZ.

P.S. Do not send a new question as a reply to a message with a different
topic -- always start a new topic.  Most mail programs will thread the
messages by ID and they may not be visible to some users.  
For example, your past messages seem to have come in as replies to the smtp
component not ready thread.

-- 
DZ-Jay [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html

--
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] Memory leaks...

2008-01-05 Thread zayin

Hello,

tcpPort: TWSocket;

tcpPort.Connect

AQTime is reporting a memory leak after I call connect.

Has anyone run into this issue?

D2007 SP3 XP Pro SP3

5.25 is in the WSocket file.


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] ICS and MidWare Frappr group

2006-01-15 Thread zayin
Hi,

I do not think that is the point. 

How about if I add you to a mailing list? Or say 100 mailing list? 

You removed our choice.


Cheers,


Mark

 

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Francois PIETTE
Sent: Sunday, January 15, 2006 9:36 AM
To: ICS support mailing
Subject: Re: [twsocket] ICS and MidWare Frappr group

 Sure their privacy policy of the day say they won't spam, but it also 
 says We reserve the right to change our privacy policy at any time

If they change their policy, this would apply only to the data they
collected after their change.

Anyway, the mailing list is indexed by google, so your email is already
referenced by google. Search for a part of a message you wrote, for example
but this part of DNS is still some kind (use double quotes in google
search to do an exact search) and you get it
(http://www.google.fr/search?num=100hl=frrls=GGLC%2CGGLC%3A1970-01%2CGGLC%
3Afrq=%22but+this+part+of+DNS+is+still+some+kind%22). 
You can aslo search for your email, either [EMAIL PROTECTED] or erv at
sympatico.ca and you find some references. You are well known on the
internet. I'm sure you already receive a lot of spam as I do (hundreds of
messages each single day).

--
[EMAIL PROTECTED]
http://www.overbyte.be


- Original Message -
From: Eric Montréal [EMAIL PROTECTED]
To: ICS support mailing twsocket@elists.org
Sent: Sunday, January 15, 2006 4:15 PM
Subject: Re: [twsocket] ICS and MidWare Frappr group


 Francois PIETTE wrote:

I added custom pins to the Frappr ICS and MidWare group
(http://www.frappr.com/icsandmidware). Using those pins, you can tell if 
you
are an ICS or a MidWare user, or both. If you already put your entry to
Frappr, please edit it to change your pin according to what you use. If 
you
haven't added yourself to the map, just do it now !




 I am sure the intention was good, and this Frappr thing can be
 appealing, but ...

 I would have liked this to be put only in the mailing list so that
 anyone interested could join
 instead of  sending all our email addresses to Rising Concept LLC who
 operate Frappr.
 (or Am I the only one who got their You have been invited to join 'ICS
 and MidWare'
 email ?)

 By doing so, you 'opted in' everyone on the list to receive whatever
 they want to send us.
 Sure their privacy policy of the day say they won't spam, but it also
 says We reserve the
 right to change our privacy policy at any time

 Clearly, their business model is to sell people's location to
 advertisers. This information is
 valuable for marketers since they can not legally get it in most
 jurisdictions.

 When people sign for a list such as this one, they expect to be
 subscribing to the list and
 nothing else. A list maintainer should always consider the membership
 list a confidential
 information and never share it with a third party.

 My 0.02 ...

--
[EMAIL PROTECTED]
http://www.overbyte.be




 -- 
 To unsubscribe or change your settings for TWSocket mailing list
 please goto http://www.elists.org/mailman/listinfo/twsocket
 Visit our website at http://www.overbyte.be 

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] OK to Receiving 2GB ?

2005-10-29 Thread zayin


http://www.faqs.org/rfcs/rfc879.html

 

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Kei
Sent: Saturday, October 29, 2005 2:26 PM
To: ICS support mailing
Subject: Re: [twsocket] OK to Receiving 2GB ?

Hi!

I think I'm going to accept the reality that... TCP packets are splitted
into arbitrary sizes.. but!!!
How do I know the maximum size possible? What is the maximum size that a
packet can be? I certainly don't want to malloc 100KB for a TCP packet...

Thanks!

David

Wilfried Mestdagh wrote:

Hello David,

  

Hi! I'm new to ICS!



Welcome to the group :)

  

A-B: msg hello
B-A: msg yo! how's it going?



Yes that's the way to go. Design a user made proto for what you intend 
to do.

  

If A is larger than the default buffer size (256 chars) then the A
(sender) will warn B in advance



You can do that, but is not nececary. Also you will maybe have a very 
mutch allocation / deallocation of memory and you can eventually end up 
with fragmented memory where you have not a nice large block in it at 
the moment you need it. But it can work, just think over carefully. A 
better idea is often to make a receive buffer that grows automatically 
if (and only if) needed, and then just reuse that buffer over and over 
again. Then you have some (re)allocation in begin but then stable.

  

TWSocket will automatically split it into packets,



Winsock will split in packets as large as the MTU (around 1500 bytes).
Eventually data can (and will if high speed) arrive as 1 large packet 
but not necacarely.

  

I really want the sender side to send the 1MB file all at once, since 
I do the FileWrite() right after Receive()



No you cannot. Winsock does not respect packet boundaries, but (see 
prior paragraph) there are no megabytes TCP packets.

You have to receive all data chuncks into a buffer, and when you 
received them all then you save to file (or save every packet direct to 
disk). There is no problem to know the moment of close the file because 
you know the length of the data from your protocol.

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

Saturday, October 29, 2005, 11:01, Kei wrote:

  

Hi! I'm new to ICS!



  

I am designing a simple protocol that will be mainly used locally (as 
a database server backend)..so I'm guessing I could send up to 2GB of 
stuff without hassle (BLOBs, for example). Right now I'm just 
experimenting with the facility for two parties to effectively talk 
to each other, even with long long messages, and with binary data
transfer.
For example, for sending a message, the command is msg [text]



A-B: msg hello
B-A: msg yo! how's it going?

  

If A is larger than the default buffer size (256 chars) then the A
(sender) will warn B in advance, like this: hey! I'm gonna send you 
1 bytes of text



A-B: longmsg 1
B-A: ready msg
A-B: msg blahblahblah...blah!

  

In this case, B will be notified of the text size, then when
OnClientDataAvailable() event comes, it will malloc a bigger buffer, 
then Receive(CustomSized_Buffer, SizeHeToldMe). Similarly Im 
considering the same mechanism to send binary data. But if the file is 
slightly


larger (10KB) then TWSocket will automatically split it into packets,
  

which I don't want it to do:



A-B: upload 1048576 picture.jpg
B-A: ready upload
A-B: 01001010101010.. (10720 bytes)
A-B: 1010101012.. (10720 bytes)
  

:
:


A-B: 01001010101010.. (4023 bytes)

  

I really want the sender side to send the 1MB file all at once, since 
I do the FileWrite() right after Receive()



  

Could anybody please help me on this issue?



  

Thanks!



  

David
















  


--
To unsubscribe or change your settings for TWSocket mailing list please goto
http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


RE: [twsocket] Interface used to reach a specific IP

2005-05-26 Thread zayin
Hi,

If you are sending the command you can bind to a NIC.

If you are not binding, then the address of the NIC can be a clue as to
which one will be used.

HTH

Zayin 

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Maurizio Lotauro
Sent: Thursday, May 26, 2005 12:00 AM
To: twsocket@elists.org
Subject: [twsocket] Interface used to reach a specific IP

Hello,

when a PC has more than one IP address (more than one NIC, one NIC and an
active connection with the modem, ...) is it possible to detect through
which local IP will be used to reach a specific IP address?
In other words, which gateway will be used for a remote IP?


Bye, Maurizio.


--
To unsubscribe or change your settings for TWSocket mailing list please goto
http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be