Re: [twsocket] URL translation

2010-02-25 Thread Michael Wayne Forrest

Hi,

I would firstly confirm that the DNS server returns the correct ip  
Address.
In addition to the above check that Actual data being sent by using  
WireShark.


Good luck.

On 22 Feb 2010, at 6:10 PM, YAMACO Software wrote:



Hello to all,

one of my customers has following problem: if he uses an IP address  
in URL
(HTTPCli), connection to the server is OK. Nevertheless while using  
valid
server name instead IP address (for example municipality1),  
connection is

not possible.

Does not know anybody what is it caused by and how to solve it ?

Thanks in advance.

With regards Karel

Ing. Karel Janeček, MBA

= YAMACO Software
= aplikační software, softwarové služby
= Prostějovičky 79, 798 03  Plumlov, Czech Republic
= IČ 484 63 850, DIČ CZ6612301300
= tel./fax: +420 582 393 605
= tel.: +420 731 616 511
= http://www.yamaco.cz
= HelpDesk: http://helpdesk.yamaco.cz
= LinkedIn: http://www.linkedin.com/in/yamaco
= Skype: yamaco.software
= ISDS: ebbd5wr
===

--
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] TCP PORT - (Already in use)

2009-10-23 Thread wayne forrest
Hello,

I need a bit of help,

How can one determine if TCP port is already in use, before I startup the
SocketServer.


Thank you.

Wayne.
--
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] header too long HTTP_MIME_TOO_LONG

2009-07-16 Thread wayne forrest
I will try my best to describe the problem I am experiencing a bit better;

My PHP side I have this:




On Dlephi side I have this:

var
 aString1,aString2 : String;
begin
  aString1 := HttpCli1.RcvdHeader.Values[xx: xx'];
  aString2 := HttpCli1.RcvdHeader.Values[yy: yy'];


aLongString1 is very long, and using the document/content is not an option
in my case;
and this would require some parsing.

I am not sure how one should pass the data from PHP to Delphi;

Should I be setting some HTTP HEADERS on the PHP SIDE, or maybe some
setting I can make to the APACHE server to get past this ERROR.

Maybe I must specify some MIME TYPE? or is this done by the APACHE SERVER ?

I used WireShark to get the "HTTP_MIME_TOO_LONG" error by watching the
network traffic.

I did not receive any error on the APACHE server nor on the Delphi side;
I have also noticed that as soon as the data becomes too large, then no data
is returned from
the PHP at all;

Any ideas are welcome please.



$alist does hold a long list of SQL data.



On Tue, Jul 14, 2009 at 5:22 PM, Francois PIETTE
wrote:

> I am receiving an error: "header too long" HTTP_MIME_TOO_LONG
>> when I call my php file, from HttpCli,
>> *How shoud one I get the vars from php?*
>>
>
> Not sure about what you mean by this sentence...
>
>  I think that there is some kind of limit in the amount of data that can
>> fit
>> into the header.
>> $alist does hold a long list of SQL data.
>> > session_start();
>> header("SQL_RESULTS: SQL_RESULTS=$alist");
>> ?>
>>
>
> Why would you send your SQL data in the header ? You should probably send
> it in the document.
>
> --
> 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
>



-- 
C: 076 337 4368
T: 021 880 2037
F: 021 880 2530
--
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] header too long HTTP_MIME_TOO_LONG

2009-07-14 Thread wayne forrest
I am receiving an error: "header too long" HTTP_MIME_TOO_LONG

when I call my php file, from HttpCli,

*How shoud one I get the vars from php?*

I think that there is some kind of limit in the amount of data that can fit
into the header.

$alist does hold a long list of SQL data.




-- 
C: 076 337 4368
T: 021 880 2037
F: 021 880 2530
--
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] ThrdSrvV2_1 and ICS V7

2009-06-25 Thread wayne forrest
We have an application that is based on ThrdSrvV2_1,
the example makes use of Two Threads, Client and Server;

ThrdSrvV2_1 was part of the ICS for Delphi 7.

We use the ThrdSrvV2_1 as a base, with ICS V7 and Delphi 2009.

What we are experiencing is a thread Detach error, (Can not Detach from
another Thread), this is when the Client Disconnects.
This does not happen all the TIME, we can run up to 10 tests before the
application will bomb with this error;

I am not sure what is causing this, but it "seems" that it depends on the
sequence that threads are finishing;

I have notices that the ThrdSrvV2_1  is dated 2001; is there a NEW one ?
Is there any ICS V7 sample that uses two Threads ?

thanking you

Wayne Forrest.
--
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] 'Cannot detach from another thread'

2009-05-29 Thread wayne forrest
I am having a problem that I do not understand, what It means,

The Error message I receive is: *'Cannot detach from another thread'*

Here is my code, based on some example I got from ICS, the code below is in
my Main Unit.


{*
  We have to attach client socket to this thread's context and then
  process messages so that TWSocket events works.
}
procedure TClientThread.Execute;
begin
if not Assigned(WSocket) then
Exit;

{ Attach client socket to this thread
}
WSocket.ThreadAttach;
{ Signal main thread that we've attached socket to this thread
}
ThreadAttached := TRUE;
{ Now let main thread continue starting the connection.
}
{ This little avoid race condition.
}
Sleep(0);
{ Let's block on critical section already owned by main thread
}
EnterCriticalSection(FCritSect);
LeaveCriticalSection(FCritSect);
{ Then process messages until WM_QUIT message is posted.
}
{ TWSocket is event-driven. So even when used within a thread, we
}
{ have to have a "message pump". Any message pump will do and there
}
{ is one built in TWSocket, so use it !
}
WSocket.MessageLoop;
{ Be sure to have main thread waiting for termination before
terminating}
Sleep(0);
{ Detach the hidden window from within the thread
}
WSocket.ThreadDetach; //<<< ERROR Event Raised.
end;

-- 
C: 076 337 4368
T: 021 880 2037
F: 021 880 2530
--
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] HttpCli extract Header Variable together with php

2009-03-24 Thread wayne forrest
Hello Francois,

you are right, it is header lines that I am referring to,
"Header-Name: value", ending with CRLF.

I find it strange that If I use the above format, I am unable to extract the
value using
HttpCli1.RcvdHeader.Values['Header-Name'];

If I use the following format, I am able to extract the value.

*"Header-Name: Header-Name=aValue"*

HttpCli1.RcvdHeader.Values['*Header-Name: Header-Name*'];

Maybe my understanding is incorrect.







On Mon, Mar 23, 2009 at 7:15 PM, Francois PIETTE
wrote:

> >I am not sure how to extract a header variable with ICS HttpCli together
> > with php
>
> No sure about what you mean by "header variable".
> As far as I know, there is no such concept in HTTP protocol.
> Maybe you mean "header line" ?
>
> --
> 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
>



-- 
C: 076 337 4368
T: 021 880 2037
F: 021 880 2530
-- 
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] HttpCli extract Header Variable together with php

2009-03-23 Thread wayne forrest
I am not sure how to extract a header variable with ICS HttpCli together
with php

Below is what I have tried:

*DELPHI*

Memo2.Lines.Add('MyVar =' + HttpCli1.RcvdHeader.Values['MY_VAR']);

*
PHP*

header("MY_VAR=$alist");

I also tried this line below

header("MY_VAR: MY_VAR=$alist");
-- 
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] HttpClient Add a Header Variable

2009-03-10 Thread wayne forrest
How does one add a Header variable to ICS HttpClient ?

thank you.
-- 
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] D2009 and HttpClient

2009-03-10 Thread wayne forrest
ICS v7 works perfect.

On Tue, Mar 10, 2009 at 10:41 AM, wayne forrest wrote:

> I think I might have the wrong ICS version.
> I will let you know when I have success.
>
> Thank you.
>
>
> On Tue, Mar 10, 2009 at 9:46 AM, wayne forrest wrote:
>
>> Arno, with what version of Delphi did you try ?
>>
>> I do not understand what I am doing wrong; Does my Code look right ?
>>
>> I have the version from the SVN installed.
>>
>> What else could be wrong ?
>>
>>
>> On Tue, Mar 10, 2009 at 8:46 AM, wayne forrest wrote:
>>
>>> Hi Arno,
>>>
>>> I updated my SVN; The Server I am using is Apache.
>>>
>>> The Funny thing is that lResultPage is empty.
>>>
>>> If I access the url via FireFox I get this:: "this me, I am a testing
>>> STrings".
>>>
>>> I must be doing something wrong.
>>>
>>>
>>> On Mon, Mar 9, 2009 at 5:36 PM, Arno Garrels wrote:
>>>
>>>> wayne forrest wrote:
>>>> > Hello,
>>>> >
>>>> > I am getting some Chinese again, if I cast it to AnsiString, I do not
>>>> > see that data that I am expecting:
>>>> > ( I presume it is either something that I am not doing or it is a bug)
>>>>
>>>> I just tried with current SVN version and it works fine.
>>>> The AnsiString cast should not matter if the received headers contain
>>>> valid chars.
>>>> How does lResultPage look, I guess it contains Chinese as well?
>>>> Is the server self-written or some public webserver?
>>>>
>>>> I recall as well that there was a bug with the receive buffer not always
>>>> cleared which led to garbage in some rare cases. A fix was checked in
>>>> with
>>>> revision #271.
>>>> In order to test whether this bug bites or not you could try with a non
>>>> persistent connection.
>>>>
>>>> --
>>>> Arno Garrels
>>>>
>>>>
>>>> --
>>>> 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
>>>>
>>>
>>>
>>>
>>> --
>>> C: 076 337 4368
>>> T: 021 880 2037
>>> F: 021 880 2530
>>>
>>
>>
>>
>> --
>> C: 076 337 4368
>> T: 021 880 2037
>> F: 021 880 2530
>>
>
>
>
> --
> C: 076 337 4368
> T: 021 880 2037
> F: 021 880 2530
>



-- 
C: 076 337 4368
T: 021 880 2037
F: 021 880 2530
-- 
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] D2009 and HttpClient

2009-03-10 Thread wayne forrest
I think I might have the wrong ICS version.
I will let you know when I have success.

Thank you.

On Tue, Mar 10, 2009 at 9:46 AM, wayne forrest wrote:

> Arno, with what version of Delphi did you try ?
>
> I do not understand what I am doing wrong; Does my Code look right ?
>
> I have the version from the SVN installed.
>
> What else could be wrong ?
>
>
> On Tue, Mar 10, 2009 at 8:46 AM, wayne forrest wrote:
>
>> Hi Arno,
>>
>> I updated my SVN; The Server I am using is Apache.
>>
>> The Funny thing is that lResultPage is empty.
>>
>> If I access the url via FireFox I get this:: "this me, I am a testing
>> STrings".
>>
>> I must be doing something wrong.
>>
>>
>> On Mon, Mar 9, 2009 at 5:36 PM, Arno Garrels  wrote:
>>
>>> wayne forrest wrote:
>>> > Hello,
>>> >
>>> > I am getting some Chinese again, if I cast it to AnsiString, I do not
>>> > see that data that I am expecting:
>>> > ( I presume it is either something that I am not doing or it is a bug)
>>>
>>> I just tried with current SVN version and it works fine.
>>> The AnsiString cast should not matter if the received headers contain
>>> valid chars.
>>> How does lResultPage look, I guess it contains Chinese as well?
>>> Is the server self-written or some public webserver?
>>>
>>> I recall as well that there was a bug with the receive buffer not always
>>> cleared which led to garbage in some rare cases. A fix was checked in
>>> with
>>> revision #271.
>>> In order to test whether this bug bites or not you could try with a non
>>> persistent connection.
>>>
>>> --
>>> Arno Garrels
>>>
>>>
>>> --
>>> 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
>>>
>>
>>
>>
>> --
>> C: 076 337 4368
>> T: 021 880 2037
>> F: 021 880 2530
>>
>
>
>
> --
> C: 076 337 4368
> T: 021 880 2037
> F: 021 880 2530
>



-- 
C: 076 337 4368
T: 021 880 2037
F: 021 880 2530
-- 
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] D2009 and HttpClient

2009-03-10 Thread wayne forrest
Arno, with what version of Delphi did you try ?

I do not understand what I am doing wrong; Does my Code look right ?

I have the version from the SVN installed.

What else could be wrong ?

On Tue, Mar 10, 2009 at 8:46 AM, wayne forrest wrote:

> Hi Arno,
>
> I updated my SVN; The Server I am using is Apache.
>
> The Funny thing is that lResultPage is empty.
>
> If I access the url via FireFox I get this:: "this me, I am a testing
> STrings".
>
> I must be doing something wrong.
>
>
> On Mon, Mar 9, 2009 at 5:36 PM, Arno Garrels  wrote:
>
>> wayne forrest wrote:
>> > Hello,
>> >
>> > I am getting some Chinese again, if I cast it to AnsiString, I do not
>> > see that data that I am expecting:
>> > ( I presume it is either something that I am not doing or it is a bug)
>>
>> I just tried with current SVN version and it works fine.
>> The AnsiString cast should not matter if the received headers contain
>> valid chars.
>> How does lResultPage look, I guess it contains Chinese as well?
>> Is the server self-written or some public webserver?
>>
>> I recall as well that there was a bug with the receive buffer not always
>> cleared which led to garbage in some rare cases. A fix was checked in with
>> revision #271.
>> In order to test whether this bug bites or not you could try with a non
>> persistent connection.
>>
>> --
>> Arno Garrels
>>
>>
>> --
>> 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
>>
>
>
>
> --
> C: 076 337 4368
> T: 021 880 2037
> F: 021 880 2530
>



-- 
C: 076 337 4368
T: 021 880 2037
F: 021 880 2530
-- 
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] D2009 and HttpClient

2009-03-09 Thread wayne forrest
Hi Arno,

I updated my SVN; The Server I am using is Apache.

The Funny thing is that lResultPage is empty.

If I access the url via FireFox I get this:: "this me, I am a testing
STrings".

I must be doing something wrong.

On Mon, Mar 9, 2009 at 5:36 PM, Arno Garrels  wrote:

> wayne forrest wrote:
> > Hello,
> >
> > I am getting some Chinese again, if I cast it to AnsiString, I do not
> > see that data that I am expecting:
> > ( I presume it is either something that I am not doing or it is a bug)
>
> I just tried with current SVN version and it works fine.
> The AnsiString cast should not matter if the received headers contain
> valid chars.
> How does lResultPage look, I guess it contains Chinese as well?
> Is the server self-written or some public webserver?
>
> I recall as well that there was a bug with the receive buffer not always
> cleared which led to garbage in some rare cases. A fix was checked in with
> revision #271.
> In order to test whether this bug bites or not you could try with a non
> persistent connection.
>
> --
> Arno Garrels
>
>
> --
> 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
>



-- 
C: 076 337 4368
T: 021 880 2037
F: 021 880 2530
-- 
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] D2009 and HttpClient

2009-03-09 Thread wayne forrest
Hello,

I am getting some Chinese again, if I cast it to AnsiString, I do not see
that data that I am expecting:
( I presume it is either something that I am not doing or it is a bug)


Here is my code:

var
 lData: TStringStream;
 lDataOut : TMemoryStream;
 lResultPage: string;
 I : Integer;
begin
  lDataOut := TMemoryStream.Create;
  lData :=  TStringStream.Create();
  //A post request would use lDataout to post data to server
  lDataOut.Seek(0, soFromBeginning);
  httpcli1.SendStream := lDataOut;
  httpcli1.RcvdStream := lData;

  HttpCli1.URL := Edit1.Text;
  HttpCli1.URL := HttpCli1.URL +'?MESSAGE=HELLO';
  HttpCli1.Get;

  lResultPage := lData.DataString;
  Memo1.Lines.Add(lResultPage);

  for I := 0 to HttpCli1.RcvdHeader.Count - 1 do begin
  Memo1.Lines.Add((AnsiString(HttpCli1.RcvdHeader[I])));
  end;

  lDataOut.Free;
  lData.Free;
-- 
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 D2009 - Chinese data in Buffer.

2009-02-26 Thread wayne forrest
Thank you guys,

so simple yet so hard to see, it makes sense.


On Thu, Feb 26, 2009 at 2:29 PM, Olivier Sannier  wrote:

> wayne forrest wrote:
> > I am expecting ASCII text yet I get the Chinese
> Because you use your "buffer" as an array of byte, yet you declare it as
> an array of Char.
> In Delphi 2009 Char is Unicode, hence the chinese characters because two
> bytes you received are combined to form one unicode character.
> What you want to do is to replace Char by AnsiChar for your buffer.
> --
> 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] ICS and D2009 - Chinese data in Buffer.

2009-02-26 Thread wayne forrest
Hello, I am experiencing a problem with ICS where the Receive buffer is an
array of char,
When I receive the data it is not what I expected, maybe my data sent is
wrong or the receiver end.

The code worked perfect with Delphi 7 but with Delphi 2009 it is failing;

In my Code I have replaced all occurrences of String with AnsiString, but
this has not solved my problem.



var
  Buffer : array [0..1023] of char; //reception buffer of 1024 characters

begin
  Len:= WSocket.ReceiveFrom(@Buffer, SizeOf(Buffer), Src, SrcLen);
  Memo1.Lines.Add(' Data Received from'+StrPas(inet_ntoa(Src.sin_addr))+
':'+ IntToStr(ntohs(Src.sin_port))+'>>'+StrPas(Buffer));

The Buffer Contains this: Data Received from x.y.z:6109>>汣敩瑮举䵁E

I am expecting ASCII text yet I get the Chinese

Any help please.
-- 
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] Delphi 2009 and ICS V7 install Error:...OverByteIcsTypes....

2009-01-29 Thread wayne forrest
Hi Arno,

Maybe I have not followed the Entire Instructions correct, but here is my
Findings:

1) This is a complete new Install no components installed, it is a FRESH
Delphi 2009 install.

After Removing the OverbyteIcsTypes from the Run.bpl package, at first
Delphi Crashed,
then I retried with Success.

regarding the .dcr resource file I simply created a new one from one of your
existing ones,
and that seemed to work.

I hope the Above helps.

On Thu, Jan 29, 2009 at 11:33 AM, Arno Garrels  wrote:

> wayne forrest wrote:
> > I am experiencing Install problems with ICS V7 that is under SVN.
> >
> > I am getting the Following Error message (retyped from the Error
> > Dialogue):
> >
> > Cannot load package 'OverbyteIcsD2009Run.' It Contains unit
> > 'OverbyteIcsTypes', which is also contained in package
> > 'OverbyteIcsSslDel120Package'
>
> At first remove any previously installed ICS:
> From Component | Install Packages remove the OverbyteIcsSslDel120Package.
> Please read the Install section in Readme.txt.
>
> --
> Arno Garrels
> --
> 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
>



-- 
C: 076 337 4368
T: 021 880 2037
F: 021 880 2530
-- 
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] Delphi 2009 and ICS V7 install Error: ...OverByteIcsTypes....

2009-01-29 Thread wayne forrest
I am experiencing Install problems with ICS V7 that is under SVN.

I am getting the Following Error message (retyped from the Error Dialogue):

Cannot load package 'OverbyteIcsD2009Run.' It Contains unit
'OverbyteIcsTypes', which is also contained in package
'OverbyteIcsSslDel120Package'

I hope the above is clear and that I am not making any install mistakes.

Wayne.
-- 
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] Install Error for branch icsv7 : [DCC Error] E1026 File not found: 'OverbyteIcsWSocketTS.dcr' Branch

2009-01-28 Thread wayne forrest
Hello ICS,

I am experiencing problems installing ICS V7, The Error I receive is:
[DCC Error] E1026 File not found: 'OverbyteIcsWSocketTS.dcr' Branch

I did a Complete Search for the File OverbyteIcsWSocketTS, and could not be
found.

The Version I have is from the SVN repository.

Thanking you.

Wayne
-- 
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] ICS version 7 Alpha and Delphi 2009 - stability

2009-01-28 Thread wayne forrest
I hope some one or ;  even maybe the GURU can add some comments.

We recently purchased Delphi 2009, and we did not CHECK on ICS if it had a
version that was in a STABLE release;

The version on the WEB refers to V7 Alpha 1,
and the readme that comes on the Delphi 2009 CD refers to V7 pre-release
Revised: Aug 4, 2008;

*Some Questions:*

   1. What is the latest version The one on the CD  or the  Alpha 1 on the
   web ?
   2. Is there any other version that we can use with D2009; our main
   concern is stability ?
   3. What is most likely not to be stable in the V7 for D2009, as we only
   use the TCP and Http stuff?


Regards

Wayne.
-- 
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] ZOMBIE established connections "netstat -a"

2008-11-07 Thread wayne forrest
Thank you, for the information Francois and Fastream.

On Thu, Nov 6, 2008 at 11:50 PM, Francois PIETTE
<[EMAIL PROTECTED]>wrote:

> >I have monitored the connection, and I see that there are a lot of TCP
> > retransmissions,
> > eventually the connections get cleaned up, but this takes some time.
> >
> > IS there a way to shorten this time ?
>
> There are registry keys which govern this behaviour. It is usually a bad
> idea to change those as it affect the whole system. Fastream suggestion is
> the best: handle some kind of timeout yourself. Quite easy to do using a
> simple timer.
>
> > Where can I find an ICS manual ?
>
> There is no manual as such. There are a lot of information sources:
> 1) The source code (Components and sample application)
> 2) The wiki
> 3) This mailing list
> 4) Google is your friend
>
>
> --
> [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
>



-- 
C: 076 337 4368
T: 021 880 2037
F: 021 880 2530
-- 
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] ZOMBIE established connections "netstat -a"

2008-11-06 Thread wayne forrest
I have monitored the connection, and I see that there are a lot of TCP
retransmissions,
eventually the connections get cleaned up, but this takes some time.

IS there a way to shorten this time ?

Where can I find an ICS manual ?

On Thu, Nov 6, 2008 at 4:04 PM, Fastream Technologies <[EMAIL PROTECTED]>wrote:

> Unless there is socket activity that would fail or socket being in
> keep-alive mode, such connections stay active unless you setup a timer and
> disconnect them in there...
>
> Best Regards,
>
> SZ
>
> On Thu, Nov 6, 2008 at 4:00 PM, wayne forrest <[EMAIL PROTECTED]
> >wrote:
>
> > Hello,
> >
> > I have "ZOMBIE" connections that remain active for some time.
> >
> > We accomplish this by connecting with a Cell phone to ICS, and remove the
> > battery while we have
> > an active TCP connection.
> >
> >
> > Is there a way that we quickly determine such connections and clean them
> > up.
> >
> > Thanking you
> >
> > Wayne Forrest.
> > --
> > 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
>



-- 
C: 076 337 4368
T: 021 880 2037
F: 021 880 2530
-- 
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] ZOMBIE established connections "netstat -a"

2008-11-06 Thread wayne forrest
Hello,

I have "ZOMBIE" connections that remain active for some time.

We accomplish this by connecting with a Cell phone to ICS, and remove the
battery while we have
an active TCP connection.


Is there a way that we quickly determine such connections and clean them up.

Thanking you

Wayne Forrest.
-- 
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] TsmtpCli - Event Mail Sent - Delete Attached Temp Files.

2008-05-08 Thread wayne forrest
Hello,

I have a problem knowing when to delete temp files, the attachments to the
Email message;

Here is my Problem I am having.

=
FIRST TRY
=

(1'st Email)
(Trigger to Send Email)-->Class Fucntion to Send Email.
Event Mail Sent -->Delete Temp


(2'nd Email)
(Trigger to Send Email)-->Class Fucntion to Send Email.
Event Mail Sent -->Delete Temp


My problem is that the File List (TStrings) is LOST or not initialized since
it is not STATIC;


=
SECOND ATTEMPT
=

I have recently changed the CLASS Structure to not use Class Functions;

But there is a problem: How do I know when to FREEandNil;
freeandNil(Jmail); // MAIL MIGHT NOT BEEN SENT AT THIS STAGE


//SEND AN EMAIL
JMail := TJEmailer.Create(nil);
JMail.sendEmail(bodytext,'Alarm!',attachList,JpegImagesPath);
freeandNil(Jmail); // MAIL MIGHT NOT BEEN SENT AT THIS STAGE


procedure TJEmailer.MailServerRequestDone(Sender: TObject;
  RqType: TSmtpRequest; ErrorCode: Word);
begin
IF RqType = smtpQuit then
begin
deleteTempImages();
end;
end;


procedure TJEmailer.deleteTempImages();
var
  idx : Integer;
begin
  for idx := 0 to (imageListD.Count-1) do
DeleteFile(imageListD[idx]);
  RemoveDir(JpegImagesPath);
  //freeAndNil(imageListD);
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] SMTP Client - Delete Temp files -

2008-05-08 Thread wayne forrest
Ok that worked by I hit a "BRICK WALL" :-( ;

This is not related to ICS but the way that the Mail-Module Works.

Here is my Problem I am having.

(1'st Email)
(Trigger to Send Email)-->Class Fucntion to Send Email.
 Event Mail Sent -->Delete Temp
Files

(2'nd Email)
(Trigger to Send Email)-->Class Fucntion to Send Email.
 Event Mail Sent -->Delete Temp
Files

My problem is that the File List (TStrings) is LOST or not initialized since
it is not STATIC;

It seems to me to solve the PRoblem I will have to not use CLASS Functions;

Is there any other way; Like a STATIC Variable in Delphi 7;

I tried the {J+} const aFileList : TStrings = nil; {J-} but it did not WORK;






On Wed, May 7, 2008 at 4:19 PM, Arno Garrels <[EMAIL PROTECTED]> wrote:

> wayne forrest wrote:
>
> > How do I know if the mail was sent OK;
>
> When OnRequestDone triggers with request smtpData and no error the
> mail has been sent to server sucessfully.
>
> Kind regards,
>
> Arno Garrels
>
> -
> DuoData Software
> Arno Garrels
> Libauer Strasse 12
> D-10245 Berlin Germany
>
> [EMAIL PROTECTED]
>
> fon  + 49  30  29 00 71 74
>
> --
> 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
>



-- 
C: 076 337 4368
T: 021 880 2037
F: 021 880 2530
-- 
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] SMTP Client - Delete Temp files -

2008-05-07 Thread wayne forrest
Hello,

After I have successfully sent the Email I need to delete the temp Files (
attachments );

How do I know if the mail was sent OK;
-- 
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] Intercept Http Request Headers and Alter Them

2008-03-19 Thread wayne forrest
Great, that is just what I needed.

Thank you.

On Tue, Mar 18, 2008 at 6:49 PM, RTT <[EMAIL PROTECTED]> wrote:

> This is a very simple parse solution, but works.
>
>HeaderList := TStringList.Create;
>HeaderList.NameValueSeparator := ':';
>HeaderList.Text := YourHeaderString; //must be a string with
> header items delimited by carriage return and line feed, as it came in
> the raw request.
>
> In this case you get a strings list where the names are the headers
> fields and the values are the fields data.
> you can easily consult/add/change a field.
> Example:
>  i:=HeaderList.IndexOfName('Content-length');
>  HeaderList.Values['Connection'] := ' Keep-Alive';
>  HeaderList.Values['Transfer-Encoding'] := ' chunked';
>
> To transform again in raw header
> YourHeaderString:=HeaderList.Text;
>
> > I am looking for a way to PARSE and ALTER http request headers.
> >
> > Currently I have the Header in a STRING, and want to ADD Headers if they
> do
> > not EXIST.
> >
> > I am not sure what Class to use: I have looked at
> >
> > var
> > web : TWebRequest;
> >
> > web := TWebRequest.Create;
> > web.Content := s; // set the Header , not even sure this is correct.
> >
> > any help appreciated.
> >
> >
> >
> >
> >
> >
>
> --
> 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
>



-- 
C: 076 337 4368
T: 021 880 2037
F: 021 880 2530
-- 
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] Intercept Http Request Headers and Alter Them

2008-03-18 Thread wayne forrest
I am looking for a way to PARSE and ALTER http request headers.

Currently I have the Header in a STRING, and want to ADD Headers if they do
not EXIST.

I am not sure what Class to use: I have looked at

var
web : TWebRequest;

web := TWebRequest.Create;
web.Content := s; // set the Header , not even sure this is correct.

any help appreciated.





-- 
C: 076 337 4368
T: 021 880 2037
F: 021 880 2530
-- 
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] Proxy server Example

2008-03-17 Thread wayne forrest
Can any one please help, I am looking for an
example of a Proxy Server.

My idea is this, I want to intercept requests and add "request properties"
and forward the requests on behalf of the clients.

"not even sure if this is possible."

thank you.
-- 
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 Hole Punching

2008-03-06 Thread wayne forrest
http://sourceforge.net/projects/ktelnet

On Thu, Mar 6, 2008 at 7:29 PM, Dave Baxter <[EMAIL PROTECTED]> wrote:

> I'll take a look.
>
> Cheers.
>
> Dave B.
>
>
> > -Original Message-
> > From: wayne forrest [mailto:[EMAIL PROTECTED]
>
> > Dave, thank you for all the advice, I will look into all of
> > it for sure,
> >
> > about the Telnet Application: I recall seeing one at sourceforge.net.
> >
> > Hope that helps.
> This mail has been scanned by Palmer Cook Computer Services Limited.
> www.palmercook.co.uk
> --
> 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
>



-- 
C: 076 337 4368
T: 021 880 2037
F: 021 880 2530
-- 
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 Hole Punching

2008-03-05 Thread wayne forrest
Dave, thank you for all the advice, I will look into all of it for sure,

about the Telnet Application: I recall seeing one at sourceforge.net.

Hope that helps.

On Wed, Mar 5, 2008 at 4:05 PM, Dave Baxter <[EMAIL PROTECTED]> wrote:

> H
>
> Probably right, Hamachi run's on full blown Windows (NT based), Linux or
> Apple systems.   Guess in principle it could run on something else, but
> it's not open source.
>
> Take a look at Tinc.  That is an open source VPN system.  Maybe that
> could be adapted to your needs?  http://www.tinc-vpn.org/
>
> I don't know much about the mobile platform arena, but from my own
> experiments and other messings, though UDP is easier to program (at
> least I find it so) TCP is better at maintaining links, especaily
> through multiple routers and firewall's etc.
>
> If you have control of the routers in question, it's not dificult to
> manualy setup port forwarding of course, and there is the questionable
> UPnP protocol where an "Application" can do it for itself.  But, that
> can also allow some very bad things to happen in regard to network
> security.
>
> As you obviously know more about the mobile environment than I do, I'll
> bow out now.  But with one question in return...
>
> Do you (or anyone else) know of a generic Telnet client for phones like
> the N6110?  It'd be so usefull..
>
> Cheers.
>
> Dave B.
>
>
> > -Original Message-
> > From: wayne forrest [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, March 05, 2008 7:06 AM
> > To: ICS support mailing
> > Subject: Re: [twsocket] UDP Hole Punching
> >
> > Dave, maybe I as not all that clear on my Specification:
> >
> > My ICS Clients will be Mobile PHones MIDP2.0, therefor I do
> > not think Hamatchi will work, or would it ?
> >
> > On Tue, Mar 4, 2008 at 4:10 PM, Dave Baxter <[EMAIL PROTECTED]> wrote:
> >
> > > "NAT Traversal" is well documented, but "less than easy" to
> > make work
> > > from scratch
> > >
> > > But why bother rolling your own?  Just download and use Hamachi.
> > > (Google for it)  Even the free one will start automaticaly when
> > > Winderz boots, then you have a UDP based secure VPN between
> > 2 (or more) sites.
> > > Just about any LAN type app will run across it.  (Versions for
> > > Winders, Linux, and some Apple OSwhatsit type things)
> > >
> > > Works very well.  I have no affiliation with Hamachi or
> > LogMeIn, just
> > > a very satisfied user of the free version so I can get to my home
> > > Win2k desktop securely wherever I am, and leaving no unwanted holes
> > > poked in the firewall.
> > >
> > > Cheers.
> > >
> > > Dave.
> > >
> > >
> > > > -Original Message-
> > > > From: JLIST [mailto:[EMAIL PROTECTED]
> > > > Sent: Saturday, February 23, 2008 8:45 AM
> > > > To: ICS support mailing
> > > > Subject: Re: [twsocket] UDP Hole Punching
> > > >
> > > > My understanding is that it works on certain types of NAT
> > firewalls.
> > > > On these NATs, an external port is mapped to an internal IP:Port.
> > > > If this is the case, all packets going to that external
> > port will go
> > > > to the internet IP:Port.
> > > >
> > > > Making it work is not that simple though, with the difficult part
> > > > being coordinating two parties that do not talk to each other.
> > > > I'm not sure what's being used in real life solutions but
> > it sounds
> > > > to me that both A and B have to have very frequent UDP
> > > > communications with S, or have a TCP connection with S in
> > order to
> > > > coordinate a hole punching attempt.
> > > >
> > > > > Isn't the translation state based on the remote peer IP
> > > > address, too?
> > > > > Then the same translation created for A-S and B-S would not
> > > > work when
> > > > > you try to connect directly A with B.
> > > >
> > > > > - Original Message -
> > > > > From: "wayne forrest" <[EMAIL PROTECTED]>
> > > > > To: "ICS support mailing" 
> > > > > Sent: Thursday, February 21, 2008 8:22 PM
> > > > > Subject: [twsocket] UDP Hole Punching
> > > >
> > > >
> > > > >> Has any one made a UDP Hole 

Re: [twsocket] UDP Hole Punching

2008-03-04 Thread wayne forrest
Dave, maybe I as not all that clear on my Specification:

My ICS Clients will be Mobile PHones MIDP2.0, therefor I do not think
Hamatchi will work, or would it ?

On Tue, Mar 4, 2008 at 4:10 PM, Dave Baxter <[EMAIL PROTECTED]> wrote:

> "NAT Traversal" is well documented, but "less than easy" to make work
> from scratch
>
> But why bother rolling your own?  Just download and use Hamachi.
> (Google for it)  Even the free one will start automaticaly when Winderz
> boots, then you have a UDP based secure VPN between 2 (or more) sites.
> Just about any LAN type app will run across it.  (Versions for Winders,
> Linux, and some Apple OSwhatsit type things)
>
> Works very well.  I have no affiliation with Hamachi or LogMeIn, just a
> very satisfied user of the free version so I can get to my home Win2k
> desktop securely wherever I am, and leaving no unwanted holes poked in
> the firewall.
>
> Cheers.
>
> Dave.
>
>
> > -Original Message-
> > From: JLIST [mailto:[EMAIL PROTECTED]
> > Sent: Saturday, February 23, 2008 8:45 AM
> > To: ICS support mailing
> > Subject: Re: [twsocket] UDP Hole Punching
> >
> > My understanding is that it works on certain types of NAT firewalls.
> > On these NATs, an external port is mapped to an internal IP:Port.
> > If this is the case, all packets going to that external port
> > will go to the internet IP:Port.
> >
> > Making it work is not that simple though, with the difficult
> > part being coordinating two parties that do not talk to each other.
> > I'm not sure what's being used in real life solutions but it
> > sounds to me that both A and B have to have very frequent UDP
> > communications with S, or have a TCP connection with S in
> > order to coordinate a hole punching attempt.
> >
> > > Isn't the translation state based on the remote peer IP
> > address, too?
> > > Then the same translation created for A-S and B-S would not
> > work when
> > > you try to connect directly A with B.
> >
> > > - Original Message -
> > > From: "wayne forrest" <[EMAIL PROTECTED]>
> > > To: "ICS support mailing" 
> > > Sent: Thursday, February 21, 2008 8:22 PM
> > > Subject: [twsocket] UDP Hole Punching
> >
> >
> > >> Has any one made a UDP Hole puncher with ICS ?
> > >>
> > >> Let A and B be the two hosts, each in its own private
> > network; N1 and N2
> > > are
> > >> the two NAT devices; S is a public server with a
> > well-known globally
> > >> reachable IP address.
> > >>
> > >>1. A and B each begin a UDP conversation with S; the
> > NAT devices N1
> > >>and N2 create UDP translation states and assign
> > temporary external port
> > >>numbers
> > >>2. S relays these port numbers back to A and B
> > >>3. A and B contact each others' NAT devices directly on
> > the translated
> > >>ports; the NAT devices use the previously created
> > translation states
> > > and
> > >>send the packets to A and B
> > >>
> > >> If I were to implement the above, is it really that simple?
> > >>
> > >> or is there much more to it than that ?
> > >>
> > >> Any help appreciated, or alternatives, maybe a plugin /
> > generic solution
> > >> that can be incorporated.
> > >>
> > >> Our current setup is "Server on PC behind nat" and then
> > client on Cell
> > >> phone.
> > >>
> > >> We will have a lot of users not knowing how to do port forwarding.
> >
> >
> >
> >
> This mail has been scanned by Palmer Cook Computer Services Limited.
> www.palmercook.co.uk
> --
> 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
>



-- 
C: 076 337 4368
T: 021 880 2037
F: 021 880 2530
-- 
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 Hole Punching

2008-02-21 Thread wayne forrest
Has any one made a UDP Hole puncher with ICS ?

Let A and B be the two hosts, each in its own private network; N1 and N2 are
the two NAT devices; S is a public server with a well-known globally
reachable IP address.

   1. A and B each begin a UDP conversation with S; the NAT devices N1
   and N2 create UDP translation states and assign temporary external port
   numbers
   2. S relays these port numbers back to A and B
   3. A and B contact each others' NAT devices directly on the translated
   ports; the NAT devices use the previously created translation states and
   send the packets to A and B

If I were to implement the above, is it really that simple?

or is there much more to it than that ?

Any help appreciated, or alternatives, maybe a plugin / generic solution
that can be incorporated.

Our current setup is "Server on PC behind nat" and then client on Cell
phone.

We will have a lot of users not knowing how to do port forwarding.

Thank you.
Wayne Forrest.
-- 
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] Invalid Window Handle when Application ClosedandActiveConnections

2008-02-19 Thread wayne forrest
Thank you Francois; I will most certainly try that.

On Feb 19, 2008 5:15 PM, Francois Piette <[EMAIL PROTECTED]> wrote:

> And more note: the code will close the connections, but will not wait
> until
> the connections are closed.
> I suggest you call Shutdown instead of Close, and use OnSessionClosed
> event
> to keep track of which connection has been gracefully closed, and use a
> TTimer to check for timeout in disconnections and the call Abort when
> appropriate. All this is to have as much as graceful connection close as
> possible. You may also elect to call Abort in the first place to directly
> close all connections.
>
> 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
>
>
> - Original Message -
> From: "Arno Garrels" <[EMAIL PROTECTED]>
> To: "ICS support mailing" 
> Sent: Tuesday, February 19, 2008 4:04 PM
> Subject: Re: [twsocket] Invalid Window Handle when Application
> ClosedandActiveConnections
>
>
> > > I have also tried adding this to the Application OnClose Event:
> > > procedure TMainForm.FormClose(Sender: TObject; var Action:
> TCloseAction);
> > > var
> > >  i : Integer;
> > > begin
> > >   i := WSocketServer1.ClientCount;
> > >   for i := 0 to i - 1 do begin
> > >WSocketServer1.Client[i].Close;
> > >   end;
> > > end;
> >
> > It's probably just a typo, however the above cannot work.
> > I also suggest to iterate the other way around:
> > "for i := WSocketServer1.ClientCount -1 downto 0 do"
> > since it may happen that the client list shrinks while
> > looping.
> > Is your application multi threaded? Have you dropped
> > the server component onto the form? What component are
> > we talking about?
> >
> > --
> > Arno Garrels [TeamICS]
> > http://www.overbyte.be/eng/overbyte/teamics.html
> >
> >
> >
> >
> > - Original Message -
> > From: "wayne forrest" <[EMAIL PROTECTED]>
> > To: "ICS support mailing" 
> > Sent: Tuesday, February 19, 2008 1:42 PM
> > Subject: Re: [twsocket] Invalid Window Handle when Application Closed
> > andActiveConnections
> >
> >
> > > It is a Bit Hard to Find the Exact Location of the Error;
> > >
> > > The Debugger goes into : Sysutils to Raise the LastOSError;
> > >
> > > System Error: 1400, invalid window handle.
> > >
> > > If I hit Ctrl+F3; to get the STACK TRace, there is nothing that is
> > > worthwhile to track.
> > >
> > >
> > > I have also tried adding this to the Application OnClose Event:
> > > procedure TMainForm.FormClose(Sender: TObject; var Action:
> TCloseAction);
> > > var
> > >  i : Integer;
> > > begin
> > >   i := WSocketServer1.ClientCount;
> > >   for i := 0 to i - 1 do begin
> > >WSocketServer1.Client[i].Close;
> > >   end;
> > > end;
> > >
> > > the above made no Difference.
> > >
> > > Any other Ideas;
> > >
> > >
> > >
> > > On Feb 19, 2008 2:32 PM, Francois Piette <[EMAIL PROTECTED]>
> > > wrote:
> > >
> > >> > I get an Error when I close my Server Application:  "Invalid Window
> > >> Handel"
> > >> > I get the ERROR when there are USers Connected.
> > >>
> > >> Run your application under the debugger to see where it happend
> exactly.
> > >>
> > >>
> > >> > I want to put something in Application on close Event.
> > >>
> > >> I suggest you disconnect all clients before closing the application.
> > >>
> > >> 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
> > >>
> > >
> > >
> > >
> > > --
> > > C: 076 337 4368
> > > T: 021 880 2037
> > > F: 021 880 2530
> > > --
> > > 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
>



-- 
C: 076 337 4368
T: 021 880 2037
F: 021 880 2530
-- 
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] Invalid Window Handle when Application Closed and Active Connections

2008-02-19 Thread wayne forrest
Hi Wilfried, thank you for the reply,

It is a bit hard to find this one for me; I am not to sure how ICS works
precisely with the Messaging mechanism;

Here is how I test the application;
I connect some users to the SERVER; then I close the Application;

I have also noticed that the ERROR only appears some times; intermittently;

Then I have also noticed a short while ago that the SERVER gives the same
error; even if no users are connected;

Maybe I should try some other DEBUG Tool; such as EurekaLOG; maybe that
gives more insight;


On Feb 19, 2008 4:30 PM, Wilfried Mestdagh <[EMAIL PROTECTED]> wrote:

> Hello wayne,
>
> possible you destroy something that also is destroyed by the application
> ?
>
> ---
> Rgds, Wilfried [TeamICS]
> http://www.overbyte.be/eng/overbyte/teamics.html
> http://www.mestdagh.biz
>
> Tuesday, February 19, 2008, 13:20, wayne forrest wrote:
>
> > Hello,
>
> > I get an Error when I close my Server Application:  "Invalid Window
> Handel"
> > I get the ERROR when there are USers Connected.
>
> > I want to put something in Application on close Event.
>
> > Thank You.
>
> --
> 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
>



-- 
C: 076 337 4368
T: 021 880 2037
F: 021 880 2530
-- 
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] Invalid Window Handle when Application Closed and ActiveConnections

2008-02-19 Thread wayne forrest
It is a Bit Hard to Find the Exact Location of the Error;

The Debugger goes into : Sysutils to Raise the LastOSError;

System Error: 1400, invalid window handle.

If I hit Ctrl+F3; to get the STACK TRace, there is nothing that is
worthwhile to track.


I have also tried adding this to the Application OnClose Event:
procedure TMainForm.FormClose(Sender: TObject; var Action: TCloseAction);
var
  i : Integer;
begin
   i := WSocketServer1.ClientCount;
   for i := 0 to i - 1 do begin
WSocketServer1.Client[i].Close;
   end;
end;

the above made no Difference.

Any other Ideas;



On Feb 19, 2008 2:32 PM, Francois Piette <[EMAIL PROTECTED]> wrote:

> > I get an Error when I close my Server Application:  "Invalid Window
> Handel"
> > I get the ERROR when there are USers Connected.
>
> Run your application under the debugger to see where it happend exactly.
>
>
> > I want to put something in Application on close Event.
>
> I suggest you disconnect all clients before closing the application.
>
> 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
>



-- 
C: 076 337 4368
T: 021 880 2037
F: 021 880 2530
-- 
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] Invalid Window Handle when Application Closed and Active Connections

2008-02-19 Thread wayne forrest
Hello,

I get an Error when I close my Server Application:  "Invalid Window Handel"
I get the ERROR when there are USers Connected.

I want to put something in Application on close Event.

Thank You.
-- 
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] Access Violation at Address 00000 - When Client App terminates

2008-02-06 Thread wayne forrest
Thank you Wilfried,

I think I have found the Problem, but still not sure what to "Check" for,

I did a Stack Trace:

First event is 10053 : Socket Disconnected, then because I was sending Data,

this code then continues to be executed:

size := Swap4(DataStream.Size);
aThread.Send(@size, len);
aThread.Send(@b[0],DataStream.Size);
if aThread.ClientThread.ThreadAttached then //
has no Effect to catch Access Violation
aThread.TryToSend;

Is there a Way that I can Detect the LastError Code for the Current Thread:

as in

if  aThread.ErrorFree then begin
  // do my send operations.
end;


Thank you.

On Feb 6, 2008 11:09 AM, Wilfried Mestdagh <[EMAIL PROTECTED]> wrote:

> Hello wayne,
>
> Yes you probably access an object that never has created, or there is
> some pointer overwritten. When you have the exception view the call
> stack window to go to the offending code.
>
> ---
> Rgds, Wilfried [TeamICS]
> http://www.overbyte.be/eng/overbyte/teamics.html
> http://www.mestdagh.biz
>
> Wednesday, February 6, 2008, 09:32, wayne forrest wrote:
>
> > I have an Access Violation at address 0, I googled on this and found
> > that this means a reference to a null.
>
> > Basically I have implemented my Application based on "ThrdSrvV2_1" demo
> > project,
>
> > The problem happens as Follows: The Client connects to the Server, then
> > requests data,
> > I then Close the Client Application (Terminate / end task).
>
> > the server then runs into this Routine: I am not sure where the Error is
> > precisely, I think it is when the Windows Message gets processed.
> > inside the "Forms unit" of delphi.
>
> > Any Ideas.
>
> > {* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
> *
> > *}
> > { We have to attach client socket to this thread's context and then
> > }
> > { process messages so that TWSocket events works.
> > }
> > procedure TClientThread.Execute;
> > begin
> > if not Assigned(WSocket) then
> > Exit;
>
> > { Attach client socket to this thread
> > }
> > WSocket.ThreadAttach;
> > { Signal main thread that we've attached socket to this thread
> > }
> > ThreadAttached := TRUE;
> > { Now let main thread continue starting the connection.
> > }
> > { This little avoid race condition.
> > }
> > Sleep(0);
> > { Let's block on critical section already owned by main thread
> > }
> > EnterCriticalSection(FCritSect);
> > LeaveCriticalSection(FCritSect);
> > { Then process messages until WM_QUIT message is posted.
> > }
> > { TWSocket is event-driven. So even when used within a thread, we
> > }
> > { have to have a "message pump". Any message pump will do and there
> > }
> > { is one built in TWSocket, so use it !
> > }
> > WSocket.MessageLoop;
> > { Be sure to have main thread waiting for termination before
> > terminating}
> > Sleep(0);
> > { Detach the hidden window from within the thread
> > }
> > WSocket.ThreadDetach;
> > 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
>



-- 
C: 076 337 4368
T: 021 880 2037
F: 021 880 2530
-- 
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] Access Violation at Address 00000 - When Client App terminates

2008-02-06 Thread wayne forrest
I have an Access Violation at address 0, I googled on this and found
that this means a reference to a null.

Basically I have implemented my Application based on "ThrdSrvV2_1" demo
project,

The problem happens as Follows: The Client connects to the Server, then
requests data,
I then Close the Client Application (Terminate / end task).

the server then runs into this Routine: I am not sure where the Error is
precisely, I think it is when the Windows Message gets processed.
inside the "Forms unit" of delphi.

Any Ideas.

{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*}
{ We have to attach client socket to this thread's context and then
}
{ process messages so that TWSocket events works.
}
procedure TClientThread.Execute;
begin
if not Assigned(WSocket) then
Exit;

{ Attach client socket to this thread
}
WSocket.ThreadAttach;
{ Signal main thread that we've attached socket to this thread
}
ThreadAttached := TRUE;
{ Now let main thread continue starting the connection.
}
{ This little avoid race condition.
}
Sleep(0);
{ Let's block on critical section already owned by main thread
}
EnterCriticalSection(FCritSect);
LeaveCriticalSection(FCritSect);
{ Then process messages until WM_QUIT message is posted.
}
{ TWSocket is event-driven. So even when used within a thread, we
}
{ have to have a "message pump". Any message pump will do and there
}
{ is one built in TWSocket, so use it !
}
WSocket.MessageLoop;
{ Be sure to have main thread waiting for termination before
terminating}
Sleep(0);
{ Detach the hidden window from within the thread
}
WSocket.ThreadDetach;
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] Send Integer ?

2008-02-04 Thread wayne forrest
Wilfried, thank you for the help,

the Function worked just perfect !

On Feb 1, 2008 11:33 AM, Wilfried Mestdagh <[EMAIL PROTECTED]> wrote:

> Hello wayne,
>
> Code is ok. And for the network byte order, it is in big endian format.
> here a function to convert the endianess of an integer:
>
> function Swap4(n: integer): integer;
> asm
>   bswap eax
> end;
>
> So you do something like this:
>
> var
>   len, size: Integer;
> begin
>   len := 4;
>   size := Swap4(ImageStream.Size);
>   aThread.Send(@size, len);
>
> ---
> Rgds, Wilfried [TeamICS]
> http://www.overbyte.be/eng/overbyte/teamics.html
> http://www.mestdagh.biz
>
> Friday, February 1, 2008, 08:07, wayne forrest wrote:
>
> > I have no joy yet, maybe you can assist a bit more,
>
>
>
> > On the receiving side I have this in java:
> > ~~
> > int ch1 = iStrm.read(); //read first byte
> > int ch2 = iStrm.read(); //read second byte
> > int ch3 = iStrm.read(); //read third byte
> > int ch4 = iStrm.read(); //read fourth byte
> > len = ((ch1 << 24) + (ch2 << 16) + (ch3 << 8) + (ch4));
> > //convert bytes to integer
> > System.out.println("LENGHT="+len);
>
> > 
> > on the Sending Side I have this ( ICS)
> > 
>
> > var
> >  len,size : Integer;
>
> > begin
> >  len := 4;
> >  size := ImageStream.Size;
> >  aThread.Send(@size,len);
>
> > ~~
> > My old code with Indy was :
> > ~~
> > aThread.Connection.WriteInteger(ImageStream.Size, true); // network byte
> > Order
>
>
>
>
> > On Jan 31, 2008 6:58 PM, Wilfried Mestdagh <[EMAIL PROTECTED]>
> wrote:
>
> >> Hello wayne,
> >>
> >> Send(TheNumber, 4);
> >> It will send in little endian format (as Intel CPU store it).
> >>
> >> ---
> >> Rgds, Wilfried [TeamICS]
> >> http://www.overbyte.be/eng/overbyte/teamics.html
> >> http://www.mestdagh.biz
> >>
> >> Thursday, January 31, 2008, 15:24, wayne forrest wrote:
> >>
> >> > I am busy converting an Indy Application to ICS,
> >>
> >> > I have a Fucntion in Indy that is : WriteInteger(anInt, true); //
> where
> >> true
> >> > = network byte Order
> >>
> >> > How can I achieve this in ICS ?
> >>
> >> --
> >> 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
> >>
>
>
>
> > --
> > C: 076 337 4368
> > T: 021 880 2037
> > F: 021 880 2530
>
> --
> 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
>



-- 
C: 076 337 4368
T: 021 880 2037
F: 021 880 2530
-- 
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] Send Integer ?

2008-01-31 Thread wayne forrest
I have no joy yet, maybe you can assist a bit more,



On the receiving side I have this in java:
~~
int ch1 = iStrm.read(); //read first byte
int ch2 = iStrm.read(); //read second byte
int ch3 = iStrm.read(); //read third byte
int ch4 = iStrm.read(); //read fourth byte
len = ((ch1 << 24) + (ch2 << 16) + (ch3 << 8) + (ch4));
//convert bytes to integer
System.out.println("LENGHT="+len);


on the Sending Side I have this ( ICS)


var
 len,size : Integer;

begin
 len := 4;
 size := ImageStream.Size;
 aThread.Send(@size,len);

~~
My old code with Indy was :
~~
aThread.Connection.WriteInteger(ImageStream.Size, true); // network byte
Order




On Jan 31, 2008 6:58 PM, Wilfried Mestdagh <[EMAIL PROTECTED]> wrote:

> Hello wayne,
>
> Send(TheNumber, 4);
> It will send in little endian format (as Intel CPU store it).
>
> ---
> Rgds, Wilfried [TeamICS]
> http://www.overbyte.be/eng/overbyte/teamics.html
> http://www.mestdagh.biz
>
> Thursday, January 31, 2008, 15:24, wayne forrest wrote:
>
> > I am busy converting an Indy Application to ICS,
>
> > I have a Fucntion in Indy that is : WriteInteger(anInt, true); // where
> true
> > = network byte Order
>
> > How can I achieve this in ICS ?
>
> --
> 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
>



-- 
C: 076 337 4368
T: 021 880 2037
F: 021 880 2530
-- 
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] Send Integer ?

2008-01-31 Thread wayne forrest
I am busy converting an Indy Application to ICS,

I have a Fucntion in Indy that is : WriteInteger(anInt, true); // where true
= network byte Order

How can I achieve this in ICS ?
-- 
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