Re: [twsocket] Help with SMTP Settings [new user]

2012-03-13 Thread Arno Garrels
Robert Baker wrote:
> I just downloaded and successfully installed [ Download ICS-V7
> Distribution (October, 2010) ] Support all Delphi 7 to Delphi XE and
> BCB version 2006 to XE  

This is a rather old version, current versions are downloadable 
here: http://wiki.overbyte.be/wiki/index.php/ICS_Download

> 
> I successfully compiled “OverbyteIcsMailHtm1” and set my login
> credentials and port but when I click “Send” I get the following: 
> 
>Connecting to SMTP server...
>Disconnected !
>RequestDone Rq=0 Error=10004
> 
> I am an ATT uVerse subscriber and here are the settings that work
> with Outlook 2007 and Outlook Express [Win 7] which both work from
> this computer:  
> 
>Email Program Settings Field:
>Incoming (POP) inbound.att.net
>Outgoing (SMTP) outbound.att.net
>(requires authentication)
>Incoming mail server: POP3
>Incoming/Outgoing User Name: Full AT&T email address, including
>domain (e.g., t...@att.net, t...@bellsouth.net) Incoming mail port
>#: 995, secure connection (SSL) checked Outgoing mail port # 465,
> secure connection (SSL) checked 
> 

SSL is required however the THtmlSmtpCli component doesn't support
SSL, TSslSmtpCli does. What you need is the TSslHtmlSmtpCli component
from the IPv6/FireMonkey Beta:
http://wiki.overbyte.be/wiki/index.php/ICS_Download

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

Re: [twsocket] Help with stalling ftp client

2012-02-01 Thread Info2004

Arno,

Thanks. I will check that out.

If it persists, I will do as advised and upload the file and post a link.

Regards,

Andy
On 01/02/2012 17:00, Arno Garrels wrote:

Info2004 wrote:

Hi,

Some additional information after hooking up wireshark.

I have attached a csv of the capture.


The list server stripped the attachment, please upload the file
to some webserver and post the URL here.



What it shows me is that I get the 150 from the server,


Now V7.11 comes to my mind, it fixed a bug back in 2010 that
might be the cause of your problem, please try latest ICSv7
from http://wiki.overbyte.be/wiki/index.php/ICS_Download
and let us know whether or not the problem persists.



--
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] Help with stalling ftp client

2012-02-01 Thread Arno Garrels
Info2004 wrote:
>> Hi,
>> 
>> Some additional information after hooking up wireshark.
>> 
>> I have attached a csv of the capture.

The list server stripped the attachment, please upload the file
to some webserver and post the URL here.

>> 
>> What it shows me is that I get the 150 from the server,

Now V7.11 comes to my mind, it fixed a bug back in 2010 that 
might be the cause of your problem, please try latest ICSv7 
from http://wiki.overbyte.be/wiki/index.php/ICS_Download
and let us know whether or not the problem persists.

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


Re: [twsocket] Help with stalling ftp client - attachment contents

2012-02-01 Thread Info2004
Attachment did not work so here it is: (ahh, can't stop thunderbird 
wrapping - sorry)


No. TimeSource  Destination Protocol
Length  Info
190 10.344855   192.168.1.3165.212.180.79   FTP 72  
Request: PASV
191	10.524256	65.212.180.79	192.168.1.31	FTP	117	Response: 227 Entering 
Passive Mode (65,212,180,79,214,237)
192	10.524302	192.168.1.31	65.212.180.79	TCP	66	54818 > ftp [ACK] 
Seq=494 Ack=1663 Win=8 Len=0 TSval=443118091 TSecr=384651593
193	10.525193	192.168.1.31	65.212.180.79	TCP	78	54831 > 55021 [SYN] 
Seq=0 Win=65535 Len=0 MSS=1460 WS=2 TSval=443118091 TSecr=0 SACK_PERM=1
194	10.701375	65.212.180.79	192.168.1.31	TCP	74	55021 > 54831 [SYN, ACK] 
Seq=0 Ack=1 Win=5792 Len=0 MSS=1402 SACK_PERM=1 TSval=384651774 
TSecr=443118091 WS=64
195	10.701407	192.168.1.31	65.212.180.79	TCP	66	54831 > 55021 [ACK] 
Seq=1 Ack=1 Win=66720 Len=0 TSval=443118267 TSecr=384651774
196	10.702119	192.168.1.31	65.212.180.79	FTP	105	Request: STOR 
18012012_1014160_leeEcersley.csv
197	10.880935	65.212.180.79	192.168.1.31	FTP	143	Response: 150 Opening 
ASCII mode data connection for 18012012_1014160_leeEcersley.csv
198	10.880970	192.168.1.31	65.212.180.79	TCP	66	54818 > ftp [ACK] 
Seq=533 Ack=1740 Win=66642 Len=0 TSval=443118445 TSecr=384651954

199 10.881595   192.168.1.3165.212.180.79   FTP-DATA157 
FTP Data: 91 bytes
200	10.881754	192.168.1.31	65.212.180.79	TCP	66	54831 > 55021 [FIN, ACK] 
Seq=92 Ack=1 Win=66720 Len=0 TSval=443118445 TSecr=384651774
201	11.062593	65.212.180.79	192.168.1.31	TCP	66	55021 > 54831 [ACK] 
Seq=1 Ack=92 Win=5824 Len=0 TSval=384652133 TSecr=443118445
202	11.062625	192.168.1.31	65.212.180.79	TCP	66	54831 > 55021 [FIN, ACK] 
Seq=92 Ack=1 Win=66720 Len=0 TSval=443118625 TSecr=384652133
203	11.063438	65.212.180.79	192.168.1.31	TCP	66	55021 > 54831 [FIN, ACK] 
Seq=1 Ack=93 Win=5824 Len=0 TSval=384652136 TSecr=443118445
204	11.063465	192.168.1.31	65.212.180.79	TCP	66	54831 > 55021 [ACK] 
Seq=93 Ack=2 Win=66720 Len=0 TSval=443118625 TSecr=384652136
205	11.064379	65.212.180.79	192.168.1.31	FTP	89	Response: 226 Transfer 
complete
206	11.064404	192.168.1.31	65.212.180.79	TCP	66	54818 > ftp [ACK] 
Seq=533 Ack=1763 Win=66696 Len=0 TSval=443118626 TSecr=384652137

207 11.142144   192.168.1.3165.212.180.79   FTP 72  
Request: PASV
208	11.316388	65.212.180.79	192.168.1.31	FTP	115	Response: 227 Entering 
Passive Mode (65,212,180,79,202,2)
209	11.316422	192.168.1.31	65.212.180.79	TCP	66	54818 > ftp [ACK] 
Seq=539 Ack=1812 Win=66670 Len=0 TSval=443118878 TSecr=384652389
210	12.820295	192.168.1.31	65.212.180.79	TCP	78	54832 > 51714 [SYN] 
Seq=0 Win=65535 Len=0 MSS=1460 WS=2 TSval=443120374 TSecr=0 SACK_PERM=1
211	13.010071	65.212.180.79	192.168.1.31	TCP	74	51714 > 54832 [SYN, ACK] 
Seq=0 Ack=1 Win=5792 Len=0 MSS=1402 SACK_PERM=1 TSval=384654080 
TSecr=443120374 WS=64
212	13.010112	192.168.1.31	65.212.180.79	TCP	66	54832 > 51714 [ACK] 
Seq=1 Ack=1 Win=66720 Len=0 TSval=443120563 TSecr=384654080
213	13.010847	192.168.1.31	65.212.180.79	FTP	105	Request: STOR 
18012012_1014360_leeEcersley.csv
214	13.191201	65.212.180.79	192.168.1.31	FTP	143	Response: 150 Opening 
ASCII mode data connection for 18012012_1014360_leeEcersley.csv
215	13.191241	192.168.1.31	65.212.180.79	TCP	66	54818 > ftp [ACK] 
Seq=578 Ack=1889 Win=66642 Len=0 TSval=443120743 TSecr=384654264


On 01/02/2012 15:00, Info2004 wrote:

Hi,

Some additional information after hooking up wireshark.

I have attached a csv of the capture.

What it shows me is that I get the 150 from the server, I then send an
ACK, but I don't send the FTP-DATA.

Then of course, I don't see the request done event, because I have not
sent the data.

For the ACK to go out after the 150 response I am assuming that the ftp
client has seen the response, and sent the ack. Or am I mistaken? Is
this a lower level interaction? (in winsock somewhere)

Why would I not send the data - is my question really?

I don't have any Application.ProcessMessages loops in my application -
apart from a start up splash screen, and an application shut down loop
waiting for a thread to close down. Neither are active when my ftp stalls.

The thread I create has nothing (intentionally) to do with the ftp
client. It monitors a usb serial port, downloads serial data and creates
files on the file system. This thread is not downloading serial data and
creating files, as there is no device connected.

I do now detect the stall with a timer, but don't currently restart -
just display a message so that the user can retry.

I am logging all RequestDone events, and nothing is reported when I
stall. I have attached the csv that shows the last good transfer, then
the stall. If an alternative format is preferred, just ask.

Ideas?

Thanks,

Andy
On 31/01/2012 15:43, Info2004 wrote:

Hi,

I have been using the ftp client component for a couple of years now
without a hitch. Until recently. The version is 7.09.

I have in

Re: [twsocket] Help with stalling ftp client

2012-02-01 Thread Info2004

Hi,

Some additional information after hooking up wireshark.

I have attached a csv of the capture.

What it shows me is that I get the 150 from the server, I then send an 
ACK, but I don't send the FTP-DATA.


Then of course, I don't see the request done event, because I have not 
sent the data.


For the ACK to go out after the 150 response I am assuming that the ftp 
client has seen the response, and sent the ack. Or am I mistaken? Is 
this a lower level interaction? (in winsock somewhere)


Why would I not send the data - is my question really?

I don't have any Application.ProcessMessages loops in my application - 
apart from a start up splash screen, and an application shut down loop 
waiting for a thread to close down. Neither are active when my ftp stalls.


The thread I create has nothing (intentionally) to do with the ftp 
client. It monitors a usb serial port, downloads serial data and creates 
files on the file system. This thread is not downloading serial data and 
creating files, as there is no device connected.


I do now detect the stall with a timer, but don't currently restart - 
just display a message so that the user can retry.


I am logging all RequestDone events, and nothing is reported when I 
stall. I have attached the csv that shows the last good transfer, then 
the stall. If an alternative format is preferred, just ask.


Ideas?

Thanks,

Andy
On 31/01/2012 15:43, Info2004 wrote:

Hi,

I have been using the ftp client component for a couple of years now
without a hitch. Until recently. The version is 7.09.

I have in the main thread a timer that runs a state machine to control
logging in and sending of the files. But recently, the state machine
stalls and times out. I have logged the debug from the component, and
you can see two successful sends, and the last one fails.

In the failed send, the STOR is issued, but the 150 Opening ASCII ...
does not happen. This is as a result of calling PutAsync on the component.

Now before I dust off wireshark, does anybody know what could cause the
150 after the STOR command?



--
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] Help with stalling ftp client

2012-01-31 Thread Arno Garrels
Brian Culverwell wrote:
> probably your backend ftp server has been changed to 'binary' type -
> and when receiving your request to STOR the .csv file - it is issuing
> a type A to change the mode to ASCII

A server doesn't issue commands, regardless of which type is active
the upload should basically work. Setting the binary type is only
important with non-Windows servers and not setting it will just 
corrupt non-text data.  

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


Re: [twsocket] Help with stalling ftp client

2012-01-31 Thread Arno Garrels
Info2004 wrote:
> On 31/01/2012 17:41, Arno Garrels wrote:
>> 
>> I guess the server did not send a response to the STOR
>> request after the client successfully established the data
>> connection. Since this is async mode your application
>> should have detected and handled a request timeout.
>> 
> Arno,
> 
> What is the correct way to handle this scenario?

Use a timer and reset some timeout value whenever data is sent
and received, on timeout I'd abort the connection and retry. 

> 
> Can I issue another PutAsync, or will I need to close the connection
> and start again?

I would abort and start a new fresh session after some wait time
until a MaxRetry value is reached, increasing the wait before each
retry.

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


Re: [twsocket] Help with stalling ftp client

2012-01-31 Thread Info2004

OK.

Thanks.

On 31/01/2012 21:46, Brian Culverwell wrote:

before each STOR

On Wed, Feb 1, 2012 at 6:27 AM, Info2004  wrote:


On 31/01/2012 19:05, Brian Culverwell wrote:


probably your backend ftp server has been changed to 'binary' type - and
when receiving your request to STOR the .csv file - it is issuing a type A
to change the mode to ASCII

You could force the Type A before issuing your STOR.



Brian,

Do you mean to set ascii initially after logging on, or before each STOR
(PutAsync) ?

Regards,

Andy

--
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] Help with stalling ftp client

2012-01-31 Thread Brian Culverwell
before each STOR

On Wed, Feb 1, 2012 at 6:27 AM, Info2004  wrote:

> On 31/01/2012 19:05, Brian Culverwell wrote:
>
>> probably your backend ftp server has been changed to 'binary' type - and
>> when receiving your request to STOR the .csv file - it is issuing a type A
>> to change the mode to ASCII
>>
>> You could force the Type A before issuing your STOR.
>>
>>
> Brian,
>
> Do you mean to set ascii initially after logging on, or before each STOR
> (PutAsync) ?
>
> Regards,
>
> Andy
>
> --
> 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] Help with stalling ftp client

2012-01-31 Thread Info2004

On 31/01/2012 19:05, Brian Culverwell wrote:

probably your backend ftp server has been changed to 'binary' type - and
when receiving your request to STOR the .csv file - it is issuing a type A
to change the mode to ASCII

You could force the Type A before issuing your STOR.



Brian,

Do you mean to set ascii initially after logging on, or before each STOR 
(PutAsync) ?


Regards,

Andy

--
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] Help with stalling ftp client

2012-01-31 Thread Info2004

On 31/01/2012 17:41, Arno Garrels wrote:


I guess the server did not send a response to the STOR
request after the client successfully established the data
connection. Since this is async mode your application
should have detected and handled a request timeout.


Arno,

What is the correct way to handle this scenario?

Can I issue another PutAsync, or will I need to close the connection and 
start again?


Regards,

Andy
--
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] Help with stalling ftp client

2012-01-31 Thread Brian Culverwell
probably your backend ftp server has been changed to 'binary' type - and
when receiving your request to STOR the .csv file - it is issuing a type A
to change the mode to ASCII

You could force the Type A before issuing your STOR.

Regards
Brian

On Wed, Feb 1, 2012 at 2:43 AM, Info2004  wrote:

> Hi,
>
> I have been using the ftp client component for a couple of years now
> without a hitch. Until recently. The version is 7.09.
>
> I have in the main thread a timer that runs a state machine to control
> logging in and sending of the files. But recently, the state machine stalls
> and times out. I have logged the debug from the component, and you can see
> two successful sends, and the last one fails.
>
> In the failed send, the STOR is issued, but the 150 Opening ASCII ... does
> not happen. This is as a result of calling PutAsync on the component.
>
> Now before I dust off wireshark, does anybody know what could cause the
> 150 after the STOR command?
>
> 
> Sending to server: 17012012_1315390_leeEcersley.**csv
> > PASV
> < 227 Entering Passive Mode (65,212,180,79,135,10)
> ! Upload Size 91
> > STOR 17012012_1315390_leeEcersley.**csv
> < 150 Opening ASCII mode data connection for 17012012_1315390_leeEcersley.
> **csv
> < 226 Transfer complete
> ! 91bytes received/sent in 360 milliseconds
> Request 18 Done.
> StatusCode = 226
> LastResponse was : '226 Transfer complete'
> Sending to server: 17012012_1317030_leeEcersley.**csv
> > PASV
> < 227 Entering Passive Mode (65,212,180,79,156,230)
> ! Upload Size 91
> > STOR 17012012_1317030_leeEcersley.**csv
> < 150 Opening ASCII mode data connection for 17012012_1317030_leeEcersley.
> **csv
> < 226 Transfer complete
> ! 91bytes received/sent in 360 milliseconds
> Request 18 Done.
> StatusCode = 226
> LastResponse was : '226 Transfer complete'
> Sending to server: 17012012_1319010_leeEcersley.**csv
> > PASV
> < 227 Entering Passive Mode (65,212,180,79,238,1)
> ! Upload Size 91
> > STOR 17012012_1319010_leeEcersley.**csv
> 
>
> Thanks,
>
> Andy
> --
> 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] Help with stalling ftp client

2012-01-31 Thread Arno Garrels
Info2004 wrote:
>> PASV
> < 227 Entering Passive Mode (65,212,180,79,238,1)
> ! Upload Size 91
>> STOR 17012012_1319010_leeEcersley.csv
> 

I guess the server did not send a response to the STOR 
request after the client successfully established the data
connection. Since this is async mode your application
should have detected and handled a request timeout.

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


Re: [twsocket] Help needed with TWSocket descendant with backgroundthread message loop

2012-01-30 Thread Arno Garrels
Robert,

You have to check for Msg.hwnd = 0 otherwise your custom message 
IDs will probably conflict which TWSocket's own messages like:

while GetMessage(MsgRec, 0, 0, 0) do
begin
  if MsgRec.hwnd = 0 then {<== ** VERY IMPORTANT ** }
  begin
Handle messages posted to this thread through PostThreadMessage()
  end
  else begin  
// Other messages posted to some window handle in this thread // 
TranslateMessage(MsgRec);
DispatchMessage(MsgRec);   
  end;

Also if you overrode TWSocket's WndProc method to handle own, custom
messages posted to TWSocket's window handle those custom messages 
MUST be allocated by overriding three more methods in ICSv6+, 
here's an example:

{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *}
function TCustomFtpCli.MsgHandlersCount : Integer;
begin
Result := 3 + inherited MsgHandlersCount;
end;


{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *}
procedure TCustomFtpCli.AllocateMsgHandlers;
begin
inherited AllocateMsgHandlers;
FMsg_WM_FTP_REQUEST_DONE := FWndHandler.AllocateMsgHandler(Self);
FMsg_WM_FTP_SENDDATA := FWndHandler.AllocateMsgHandler(Self);
FMsg_WM_FTP_CLOSEDOWN:= FWndHandler.AllocateMsgHandler(Self);
end;


{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *}
procedure TCustomFtpCli.FreeMsgHandlers;
begin
if Assigned(FWndHandler) then begin
FWndHandler.UnregisterMessage(FMsg_WM_FTP_REQUEST_DONE);
FWndHandler.UnregisterMessage(FMsg_WM_FTP_SENDDATA);
FWndHandler.UnregisterMessage(FMsg_WM_FTP_CLOSEDOWN);
end;
inherited FreeMsgHandlers;
end;


{* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *}

BTW: Method PutDataInSendBuffer() actually _is thread-safe, so there is
no need to copy data a second time to a custom buffer.

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


Re: [twsocket] Help - THttpServer and PUT

2012-01-24 Thread Arno Garrels
Arno Garrels wrote:
> Kamil Pavel Skála wrote:
>> Hi,
>> i test the ics komponent and creating RESTful service, but have
>> problem with implementing unimplemented
>> request PUT. I handled PUT and DELETE in the OnUnknownRequest, bud
>> where is data sending by client via PUT method?
>> 
>> Any samples or documentation?
> 
> PUT method is very similar to POST
> http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html
> The OverbyteIcsWebServ demo shows how to handle POST
> requests.

It's likely most simple to just override 
THttpConnection.TriggerUnknownRequestMethod and then handle 
PUT requests in the OnPostDocument and OnPostedData events as well.

{code}
procedure TMyHttpConnection.TriggerUnknownRequestMethod(var Handled: Boolean);
begin
  if Method = 'PUT' then
  begin
ProcessPost;
Handled := True;
  end
  else
inherited;
end;
{code}


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


Re: [twsocket] Help - THttpServer and PUT

2012-01-24 Thread Arno Garrels
Kamil Pavel Skála wrote:
> Hi,
> i test the ics komponent and creating RESTful service, but have
> problem with implementing unimplemented 
> request PUT. I handled PUT and DELETE in the OnUnknownRequest, bud
> where is data sending by client via PUT method? 
> 
> Any samples or documentation?

PUT method is very similar to POST
http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html
The OverbyteIcsWebServ demo shows how to handle POST
requests.

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


Re: [twsocket] help on httpcli post

2010-10-12 Thread Xavier Mor-Mur

 Hi RTT

Thanks for sample. I play with it in few minutes.

I read many off post even when are out of my programing knowledge, give 
me ideas how to do better my programs.

Thanks again to all ICS folks.

Xavi

Al 12/10/2010 18:55, En/na RTT ha escrit:


Here is a sample that work.

Get the 'multipart/form-data' encode tstream class code from this unit:
http://read.pudn.com/downloads116/sourcecode/internet/495621/Gz235_200671623235689/cn700_del549790557/IndyMultipartFormData/MsMultiPartFormData.pas__.htm 



Start a new Delphi application, and in the main form place:

1 THttpCli,
1 TButton,
1 TMemo
1 TOpenDialog

   function GetMimeType(fileName: string): string;
   var reg: tregistry;
  ext: string;
   begin
  result := 'application/unknown';
  ext := lowercase(extractFileExt(filename));
  reg := tregistry.Create;
  try
reg.RootKey := HKEY_CLASSES_ROOT;
if reg.OpenKey(ext, false) and reg.ValueExists('Content Type') 
then

  result := reg.ReadString('Content Type')
  finally
reg.Free;
  end;
   end;

   procedure TForm1.UploadFile(url, Filename: string);
   var
  MultiPartFormDataStream: TMsMultiPartFormDataStream;
  fStream: TFileStream;
   begin
  fStream := TFileStream.Create(Filename, fmOpenRead);
  MultiPartFormDataStream := TMsMultiPartFormDataStream.create;
  MultiPartFormDataStream.AddFile('fileupload1',
   ExtractFileName(filename), GetMimeType(Filename), fstream);
  fStream.free;
  //there is a bug in the HFS code so we need to add a dummy field 
here

  MultiPartFormDataStream.AddFormField('fileupload2', '');
  MultiPartFormDataStream.PrepareStreamForDispatch;
  MultiPartFormDataStream.Position := 0;
  Memo1.Lines.LoadFromStream(MultiPartFormDataStream);
  MultiPartFormDataStream.Position := 0;
  HttpCli1.ContentTypePost := 'multipart/form-data;
   boundary='+MultiPartFormDataStream.Boundary;
  HttpCli1.SendStream := MultiPartFormDataStream;
  HttpCli1.URL := url;
  HttpCli1.Post;
  HttpCli1.SendStream.free;
   end;

   procedure TForm1.Button1Click(Sender: TObject);
   begin
  if OpenDialog1.Execute then
UploadFile('http://81.184.21.22:100/hfs/', OpenDialog1.FileName);
   end;

I have just now upload a file with this code to your HFS server.

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



Se certifico que el correo entrante no contiene virus.
Comprobada por AVG - www.avg.es
Version: 9.0.862 / Base de datos de virus: 271.1.1/3192 - Fecha de la version: 
10/12/10 08:34:00



--
Xavier Mor-Mur

--
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] help on httpcli post

2010-10-12 Thread RTT


Here is a sample that work.

Get the 'multipart/form-data' encode tstream class code from this unit:
http://read.pudn.com/downloads116/sourcecode/internet/495621/Gz235_200671623235689/cn700_del549790557/IndyMultipartFormData/MsMultiPartFormData.pas__.htm

Start a new Delphi application, and in the main form place:

1 THttpCli,
1 TButton,
1 TMemo
1 TOpenDialog

   function GetMimeType(fileName: string): string;
   var reg: tregistry;
  ext: string;
   begin
  result := 'application/unknown';
  ext := lowercase(extractFileExt(filename));
  reg := tregistry.Create;
  try
reg.RootKey := HKEY_CLASSES_ROOT;
if reg.OpenKey(ext, false) and reg.ValueExists('Content Type') then
  result := reg.ReadString('Content Type')
  finally
reg.Free;
  end;
   end;

   procedure TForm1.UploadFile(url, Filename: string);
   var
  MultiPartFormDataStream: TMsMultiPartFormDataStream;
  fStream: TFileStream;
   begin
  fStream := TFileStream.Create(Filename, fmOpenRead);
  MultiPartFormDataStream := TMsMultiPartFormDataStream.create;
  MultiPartFormDataStream.AddFile('fileupload1',
   ExtractFileName(filename), GetMimeType(Filename), fstream);
  fStream.free;
  //there is a bug in the HFS code so we need to add a dummy field here
  MultiPartFormDataStream.AddFormField('fileupload2', '');
  MultiPartFormDataStream.PrepareStreamForDispatch;
  MultiPartFormDataStream.Position := 0;
  Memo1.Lines.LoadFromStream(MultiPartFormDataStream);
  MultiPartFormDataStream.Position := 0;
  HttpCli1.ContentTypePost := 'multipart/form-data;
   boundary='+MultiPartFormDataStream.Boundary;
  HttpCli1.SendStream := MultiPartFormDataStream;
  HttpCli1.URL := url;
  HttpCli1.Post;
  HttpCli1.SendStream.free;
   end;

   procedure TForm1.Button1Click(Sender: TObject);
   begin
  if OpenDialog1.Execute then
UploadFile('http://81.184.21.22:100/hfs/', OpenDialog1.FileName);
   end;

I have just now upload a file with this code to your HFS server.

--
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] help on httpcli post

2010-10-12 Thread Xavier Mor-Mur

 Thanks Francois and Frans
I will take look.
May need is the most basic use of http get/post.
Sporadically and need send files to servers for which I don't have any 
support/control.
Some of them have ftp support, no problem with ICS, but troubles I come 
with http protocol.

I'm a permanent beginner programmer.
Many thanks for all
Xavi

Al 12/10/2010 14:44, En/na Francois PIETTE ha escrit:

As I know HFS have a some kind of code but I don't know how to call it
from client.
Open on your navigator "http:// 81.184.21.22 :100/hfs/" and will see 
a very

easy web page with list of files with two buttons "UPLOAD" and "LOGIN".
Upload button allow select up to 10 files and then upload it using 
"UPLOAD

FILES" button.
HFS is one exe and one config file, don't need install and all work is
done internally.


The browser will interpret the JavaScript which is behind the form and
post/get the files to the website.
I suggest you use WireShark to see what URL your browser use to post the
files. It is usually much easier to see what the browser do than 
trying to
understand complex JavaScript which is probably written so that you 
cannot

easily reverse engineer it.


Any idea is welcome, in the mean time will try with options of HFS.


I don't know your requirements, but why don't you write your own server
program using ICS component ? You have everything you need there.

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



Se certifico que el correo entrante no contiene virus.
Comprobada por AVG - www.avg.es
Version: 9.0.862 / Base de datos de virus: 271.1.1/3192 - Fecha de la version: 
10/12/10 08:34:00



--
Xavier Mor-Mur

--
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] help on httpcli post

2010-10-12 Thread Francois PIETTE

As I know HFS have a some kind of code but I don't know how to call it
from client.
Open on your navigator "http:// 81.184.21.22 :100/hfs/" and will see a 
very

easy web page with list of files with two buttons "UPLOAD" and "LOGIN".
Upload button allow select up to 10 files and then upload it using "UPLOAD
FILES" button.
HFS is one exe and one config file, don't need install and all work is
done internally.


The browser will interpret the JavaScript which is behind the form and
post/get the files to the website.
I suggest you use WireShark to see what URL your browser use to post the
files. It is usually much easier to see what the browser do than trying to
understand complex JavaScript which is probably written so that you cannot
easily reverse engineer it.


Any idea is welcome, in the mean time will try with options of HFS.


I don't know your requirements, but why don't you write your own server
program using ICS component ? You have everything you need there.

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


Re: [twsocket] help on httpcli post

2010-10-12 Thread Frans van Daalen

Hi Xavier,

Francois is trying to tell you that you need to read some more about the 
difference between post and get and the way those work in a form.


Try the following

Host: 81.184.21.22:100
url = POST /hfs/.
data = 
fileupload1=C%3A%5CDocuments+and+Settings%5C%5CDesktop%5Ctest.txt&upbtn=Upload+files


this will upload a file (test.txt) from the desktop of user XX to the 
server



- Original Message - 
From: "Xavier Mor-Mur" 

To: "ICS support mailing" 
Sent: Tuesday, October 12, 2010 1:23 PM
Subject: Re: [twsocket] help on httpcli post



 Hello Francois

As I know HFS have a some kind of code but I don't know how to call it 
from client.
Open on your navigator "http://81.184.21.22:100/hfs/"; and will see a very 
easy web page with list of files with two buttons "UPLOAD" and "LOGIN". 
Upload button allow select up to 10 files and then upload it using "UPLOAD 
FILES" button.
HFS is one exe and one config file, don't need install and all work is 
done internally.


I tried some demos using http post and only found one which works.
Demo which works is "submitfile" from 
http://www.clevercomponents.com/products/inetsuite/demos/submitfile.asp
I don't know it does but it works, but other http demos from same site 
using post don't work.


Any idea is welcome, in the mean time will try with options of HFS.

Regards
Xavi

Al 12/10/2010 09:48, En/na Francois PIETTE ha escrit:
I try to include http get and post to my program and doing tests on 
OverbyteIcshttptst demo.

I get function GET work but not with function POST.

I configured at home free "HFS - HTTP File Server" from 
http://www.rejetto.com/hfs/

When running demo I set
URL = http://81.184.21.22:100/hfs/c-obfuscado.txt
Data = C:\Mis documentos\c-obfuscado.txt
Button GET works and how text file in panel
Button POST give sequence events bellow.
POST Failed !
StatusCode   = 404
ReasonPhrase = Request aborted on timeout

Sure I missing to do something but I don't know what.


You cannot do a post to a document link unless there is a script (or 
whatever code is required) at server side to handle the post.


I suggest you first try posting using your favorite internet navigator to 
validate the webserver configuration, then you may start doing the same 
with the component.


Usually, the webserver has an HTML form with some fields (including file 
field) and a submit button. behing the submit button, you have the URL 
used to "post" the form. This is the URL you have to use with the 
component.


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



Se certifico que el correo entrante no contiene virus.
Comprobada por AVG - www.avg.es
Version: 9.0.862 / Base de datos de virus: 271.1.1/3192 - Fecha de la 
version: 10/12/10 08:34:00




--
Xavier Mor-Mur

--
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] help on httpcli post

2010-10-12 Thread Xavier Mor-Mur

 Hello Francois

As I know HFS have a some kind of code but I don't know how to call it 
from client.
Open on your navigator "http://81.184.21.22:100/hfs/"; and will see a 
very easy web page with list of files with two buttons "UPLOAD" and 
"LOGIN". Upload button allow select up to 10 files and then upload it 
using "UPLOAD FILES" button.
HFS is one exe and one config file, don't need install and all work is 
done internally.


I tried some demos using http post and only found one which works.
Demo which works is "submitfile" from 
http://www.clevercomponents.com/products/inetsuite/demos/submitfile.asp
I don't know it does but it works, but other http demos from same site 
using post don't work.


Any idea is welcome, in the mean time will try with options of HFS.

Regards
Xavi

Al 12/10/2010 09:48, En/na Francois PIETTE ha escrit:
I try to include http get and post to my program and doing tests on 
OverbyteIcshttptst demo.

I get function GET work but not with function POST.

I configured at home free "HFS - HTTP File Server" from 
http://www.rejetto.com/hfs/

When running demo I set
URL = http://81.184.21.22:100/hfs/c-obfuscado.txt
Data = C:\Mis documentos\c-obfuscado.txt
Button GET works and how text file in panel
Button POST give sequence events bellow.
POST Failed !
StatusCode   = 404
ReasonPhrase = Request aborted on timeout

Sure I missing to do something but I don't know what.


You cannot do a post to a document link unless there is a script (or 
whatever code is required) at server side to handle the post.


I suggest you first try posting using your favorite internet navigator 
to validate the webserver configuration, then you may start doing the 
same with the component.


Usually, the webserver has an HTML form with some fields (including 
file field) and a submit button. behing the submit button, you have 
the URL used to "post" the form. This is the URL you have to use with 
the component.


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



Se certifico que el correo entrante no contiene virus.
Comprobada por AVG - www.avg.es
Version: 9.0.862 / Base de datos de virus: 271.1.1/3192 - Fecha de la version: 
10/12/10 08:34:00



--
Xavier Mor-Mur

--
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] help on httpcli post

2010-10-12 Thread Francois PIETTE
I try to include http get and post to my program and doing tests on 
OverbyteIcshttptst demo.

I get function GET work but not with function POST.

I configured at home free "HFS - HTTP File Server" from 
http://www.rejetto.com/hfs/

When running demo I set
URL = http://81.184.21.22:100/hfs/c-obfuscado.txt
Data = C:\Mis documentos\c-obfuscado.txt
Button GET works and how text file in panel
Button POST give sequence events bellow.
POST Failed !
StatusCode   = 404
ReasonPhrase = Request aborted on timeout

Sure I missing to do something but I don't know what.


You cannot do a post to a document link unless there is a script (or 
whatever code is required) at server side to handle the post.


I suggest you first try posting using your favorite internet navigator to 
validate the webserver configuration, then you may start doing the same with 
the component.


Usually, the webserver has an HTML form with some fields (including file 
field) and a submit button. behing the submit button, you have the URL used 
to "post" the form. This is the URL you have to use with the component.


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


Re: [twsocket] help to convert from utf8 to ansi (locale)

2010-04-29 Thread Xavier Mor-Mur

Hello Arno
Thanks your comments. I need update my head from ansi to unicode :-)
Should not be problem, or that I think, converting unicode encoded files 
to ansi. as all files will created on local network.
I will read a bit more about differences between UTF8String and 
UnicodeString, help from BC2009 is not clear.


Xavi

Al 29/04/2010 08:54, En/na Arno Garrels ha escrit:

Xavier Mor-Mur wrote:

   

String usStr; (or UnicodeString usStr;)
AnsiString asStr;

usStr = URLDEcode( "Sin%20t%C3%ADtulo%201_html_m5b7e3440.jpg" );
asStr = usStr;<--- Compiler introduce required conversion code

using
   asStr = UTF8Decode( usStr );
or
  asSTR = UTF8Decode( URLDEcode(
"Sin%20t%C3%ADtulo%201_html_m5b7e3440.jpg" ) );
 

Conversion from Unicode to AnsiString might lead to dataloss,
whether the source be UTF-8 or UTF-16. If you actually need a
AnsiString with code page CP_UTF8 you should use type UTF8String
instead of AnsiString.
Since 2009 the compiler is code page aware and implicitly
converts between UTF8String and (Unicode)String without
dataloss and warnings. In this case one could also write a
slighty different version of UrlDecode() that returned a
UTF8String to save a few conversions.

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



Se certifico que el correo entrante no contiene virus.
Comprobada por AVG - www.avg.es
Version: 9.0.814 / Base de datos de virus: 271.1.1/2840 - Fecha de la version: 
04/28/10 08:27:00

   


--
Xavier Mor-Mur

--
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] help to convert from utf8 to ansi (locale)

2010-04-29 Thread Xavier Mor-Mur

Hi RTT
Yes I use UrlDecode from OverbyteIcsUrl.hpp with defaults SrcCodePage 
and DetectUtf8. Alternative, I not found other, was include Indy 
component but using ICS I think isn't unnecessary.

I will check using no default parameters.

Thanks again
Xavi


Al 29/04/2010 03:16, En/na RTT ha escrit:

Hi Xavier,
The UTF8Decode is being performed automatically probably because you 
are using the UrlDecode function from OverbyteIcsHttpSrv. If you check 
its definition,


function UrlDecode(const Url: string; SrcCodePage: LongWord = CP_ACP;  
DetectUtf8: Boolean = TRUE): string;


there is a, default set to true, parameter,  DetectUtf8, to define if 
the auto-detection, and decoding, of UTF8 encoded strings must be made 
automatically by the function after the URLDecode conversion



Hi RTT

Thanks for your tips. Finally I get it work but I should write code a 
bit different


String usStr; (or UnicodeString usStr;)
AnsiString asStr;

usStr = URLDEcode( "Sin%20t%C3%ADtulo%201_html_m5b7e3440.jpg" );
asStr = usStr; <--- Compiler introduce required conversion code

using
 asStr = UTF8Decode( usStr );
or
asSTR = UTF8Decode( URLDEcode( 
"Sin%20t%C3%ADtulo%201_html_m5b7e3440.jpg" ) );


give asStr = NULL
I think D2009 and BC2009 works diferent when doing inline automatic 
conversions.


Many thanks for all

Xavi



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



Se certifico que el correo entrante no contiene virus.
Comprobada por AVG - www.avg.es
Version: 9.0.814 / Base de datos de virus: 271.1.1/2840 - Fecha de la version: 
04/28/10 08:27:00

   


--
Xavier Mor-Mur

--
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] help to convert from utf8 to ansi (locale)

2010-04-28 Thread Arno Garrels
Xavier Mor-Mur wrote:

> String usStr; (or UnicodeString usStr;)
> AnsiString asStr;
> 
> usStr = URLDEcode( "Sin%20t%C3%ADtulo%201_html_m5b7e3440.jpg" );
> asStr = usStr; <--- Compiler introduce required conversion code
> 
> using
>   asStr = UTF8Decode( usStr );
> or
>  asSTR = UTF8Decode( URLDEcode(
> "Sin%20t%C3%ADtulo%201_html_m5b7e3440.jpg" ) );

Conversion from Unicode to AnsiString might lead to dataloss, 
whether the source be UTF-8 or UTF-16. If you actually need a 
AnsiString with code page CP_UTF8 you should use type UTF8String
instead of AnsiString. 
Since 2009 the compiler is code page aware and implicitly 
converts between UTF8String and (Unicode)String without
dataloss and warnings. In this case one could also write a 
slighty different version of UrlDecode() that returned a 
UTF8String to save a few conversions.

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


Re: [twsocket] help to convert from utf8 to ansi (locale)

2010-04-28 Thread RTT

Hi Xavier,
The UTF8Decode is being performed automatically probably because you are 
using the UrlDecode function from OverbyteIcsHttpSrv. If you check its 
definition,


function UrlDecode(const Url: string; SrcCodePage: LongWord = CP_ACP;  
DetectUtf8: Boolean = TRUE): string;


there is a, default set to true, parameter,  DetectUtf8, to define if 
the auto-detection, and decoding, of UTF8 encoded strings must be made 
automatically by the function after the URLDecode conversion



Hi RTT

Thanks for your tips. Finally I get it work but I should write code a 
bit different


String usStr; (or UnicodeString usStr;)
AnsiString asStr;

usStr = URLDEcode( "Sin%20t%C3%ADtulo%201_html_m5b7e3440.jpg" );
asStr = usStr; <--- Compiler introduce required conversion code

using
 asStr = UTF8Decode( usStr );
or
asSTR = UTF8Decode( URLDEcode( 
"Sin%20t%C3%ADtulo%201_html_m5b7e3440.jpg" ) );


give asStr = NULL
I think D2009 and BC2009 works diferent when doing inline automatic 
conversions.


Many thanks for all

Xavi



--
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] help to convert from utf8 to ansi (locale)

2010-04-28 Thread Xavier Mor-Mur

Hi RTT

Thanks for your tips. Finally I get it work but I should write code a 
bit different


String usStr; (or UnicodeString usStr;)
AnsiString asStr;

usStr = URLDEcode( "Sin%20t%C3%ADtulo%201_html_m5b7e3440.jpg" );
asStr = usStr; <--- Compiler introduce required conversion code

using
 asStr = UTF8Decode( usStr );
or
asSTR = UTF8Decode( URLDEcode( 
"Sin%20t%C3%ADtulo%201_html_m5b7e3440.jpg" ) );


give asStr = NULL
I think D2009 and BC2009 works diferent when doing inline automatic 
conversions.


Many thanks for all

Xavi


Al 29/04/2010 00:37, En/na RTT ha escrit:
Obviously what works fine is the sequence of decode transformations on 
your encoded filename, not in the already decoded string as I posted. 
Sorry.

This is the correct example:
UTF8Decode(URLDEcode('Sin%20t%C3%ADtulo%201_html_m5b7e3440.jpg'));


This seems to work fine

UTF8Decode(URLDecode('Sin título1_html_m5b7e3440.jpg'));


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



Se certificó que el correo entrante no contiene virus.
Comprobada por AVG - www.avg.es
Versión: 9.0.814 / Base de datos de virus: 271.1.1/2840 - Fecha de la versión: 
04/28/10 08:27:00

   


--
Xavier Mor-Mur

--
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] help to convert from utf8 to ansi (locale)

2010-04-28 Thread RTT
Obviously what works fine is the sequence of decode transformations on 
your encoded filename, not in the already decoded string as I posted. Sorry.

This is the correct example:
UTF8Decode(URLDEcode('Sin%20t%C3%ADtulo%201_html_m5b7e3440.jpg'));


This seems to work fine

UTF8Decode(URLDecode('Sin título1_html_m5b7e3440.jpg'));


--
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] help to convert from utf8 to ansi (locale)

2010-04-28 Thread RTT

This seems to work fine

UTF8Decode(URLDecode('Sin título1_html_m5b7e3440.jpg'));


Curiosity struck, so I googled it...
Apparently you aren't the only one with this issue.
If you have the string before it gets encoded in the 1st place you can
convert to UTF8 first, then encode it to URL so you can decode it properly.
If you don't have access to the string before encoding... I think you have a
problem and may have to handle on your own.  You might be able to detect the
1st as a high ascii value and use that to flag using both to combine as one.

If you do find/create a solution, let us know.  I'm sure we'll run across
needing something like that at some point...

Matt

-Original Message-
From: twsocket-boun...@elists.org [mailto:twsocket-boun...@elists.org] On
Behalf Of Xavier Mor-Mur
Sent: Wednesday, April 28, 2010 15:53
To: ICS support mailing
Subject: Re: [twsocket] help to convert from utf8 to ansi (locale)

Thanks for the tip.

I tried it with no success.
URLEncode and URLDecode work apparently byte a byte and %C3%AD are converted
as individual chars.
UTF8Encode and UTF8Decode I don't get it work.
certainly I'm doing something wrong.

Regards
Xavi

Al 28/04/2010 22:36, En/na Matt Minnis ha escrit:
   

The %## codes are representations of the character.  It looks like a
URL encoding scheme to me.
For example:  %20 is the space character. The %C3%AD looks to be the
letter i with the accent.
Run it though a URL Decoder and see if that doesn't get you what you
are looking for?

Matt

-Original Message-
From: twsocket-boun...@elists.org [mailto:twsocket-boun...@elists.org]
On Behalf Of Xavier Mor-Mur
Sent: Wednesday, April 28, 2010 14:19
To: ICS support mailing
Subject: [twsocket] help to convert from utf8 to ansi (locale)

Hi to all

I need to parse text to send via email if there are declared any file.
If text is html and saved from word processors or html editors all
chars out of first 127 ASCII set are convert using utf8 convention.
What I need is recover original text to check if declared files exists.

First I was working with BCB5 but it have reduced support for unicode
strings.
Now I'm using BC2009 but I'm walking around the same point.

Example of I get as parameter and what I need to test :
from file I get "Sin%20t%C3%ADtulo%201_html_m5b7e3440.jpg"
and I need "Sin título1_html_m5b7e3440.jpg"

I played with ansi, wide, unicode, utf8 variables and functions with
no success.

Thanks in advance for your help.

--
Xavier Mor-Mur

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



Se certificó que el correo entrante no contiene virus.
Comprobada por AVG - www.avg.es
Versión: 9.0.814 / Base de datos de virus: 271.1.1/2840 - Fecha de la
versión: 04/28/10 08:27:00


 

--
Xavier Mor-Mur

--
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] help to convert from utf8 to ansi (locale)

2010-04-28 Thread Xavier Mor-Mur

I'll will work on it as I need to solve.
Situation exposed is a test after report program was not working properly.
As I detected MS-Word encode partially and OpenOffice encode fully.

Regards


Al 28/04/2010 23:41, En/na Matt Minnis ha escrit:

Al 28/04/2010 22:36, En/na Matt Minnis ha escrit:
   

>  The %## codes are representations of the character.  It looks like a
>  URL encoding scheme to me.
>  For example:  %20 is the space character. The %C3%AD looks to be the
>  letter i with the accent.
>  Run it though a URL Decoder and see if that doesn't get you what you
>  are looking for?
>
>  Matt
>
 


--
Xavier Mor-Mur

--
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] help to convert from utf8 to ansi (locale)

2010-04-28 Thread Matt Minnis
Curiosity struck, so I googled it...
Apparently you aren't the only one with this issue.
If you have the string before it gets encoded in the 1st place you can
convert to UTF8 first, then encode it to URL so you can decode it properly.
If you don't have access to the string before encoding... I think you have a
problem and may have to handle on your own.  You might be able to detect the
1st as a high ascii value and use that to flag using both to combine as one.

If you do find/create a solution, let us know.  I'm sure we'll run across
needing something like that at some point...

Matt

-Original Message-
From: twsocket-boun...@elists.org [mailto:twsocket-boun...@elists.org] On
Behalf Of Xavier Mor-Mur
Sent: Wednesday, April 28, 2010 15:53
To: ICS support mailing
Subject: Re: [twsocket] help to convert from utf8 to ansi (locale)

Thanks for the tip.

I tried it with no success.
URLEncode and URLDecode work apparently byte a byte and %C3%AD are converted
as individual chars.
UTF8Encode and UTF8Decode I don't get it work.
certainly I'm doing something wrong.

Regards
Xavi

Al 28/04/2010 22:36, En/na Matt Minnis ha escrit:
> The %## codes are representations of the character.  It looks like a 
> URL encoding scheme to me.
> For example:  %20 is the space character. The %C3%AD looks to be the 
> letter i with the accent.
> Run it though a URL Decoder and see if that doesn't get you what you 
> are looking for?
>
> Matt
>
> -Original Message-
> From: twsocket-boun...@elists.org [mailto:twsocket-boun...@elists.org] 
> On Behalf Of Xavier Mor-Mur
> Sent: Wednesday, April 28, 2010 14:19
> To: ICS support mailing
> Subject: [twsocket] help to convert from utf8 to ansi (locale)
>
> Hi to all
>
> I need to parse text to send via email if there are declared any file.
> If text is html and saved from word processors or html editors all 
> chars out of first 127 ASCII set are convert using utf8 convention.
> What I need is recover original text to check if declared files exists.
>
> First I was working with BCB5 but it have reduced support for unicode 
> strings.
> Now I'm using BC2009 but I'm walking around the same point.
>
> Example of I get as parameter and what I need to test :
> from file I get "Sin%20t%C3%ADtulo%201_html_m5b7e3440.jpg"
> and I need "Sin título1_html_m5b7e3440.jpg"
>
> I played with ansi, wide, unicode, utf8 variables and functions with 
> no success.
>
> Thanks in advance for your help.
>
> --
> Xavier Mor-Mur
>
> --
> 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
>
>
>
> Se certificó que el correo entrante no contiene virus.
> Comprobada por AVG - www.avg.es
> Versión: 9.0.814 / Base de datos de virus: 271.1.1/2840 - Fecha de la 
> versión: 04/28/10 08:27:00
>
>

--
Xavier Mor-Mur

--
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] help to convert from utf8 to ansi (locale)

2010-04-28 Thread Xavier Mor-Mur

Thanks for the tip.

I tried it with no success.
URLEncode and URLDecode work apparently byte a byte and %C3%AD are 
converted as individual chars.

UTF8Encode and UTF8Decode I don't get it work.
certainly I'm doing something wrong.

Regards
Xavi

Al 28/04/2010 22:36, En/na Matt Minnis ha escrit:

The %## codes are representations of the character.  It looks like a URL
encoding scheme to me.
For example:  %20 is the space character. The %C3%AD looks to be the letter
i with the accent.
Run it though a URL Decoder and see if that doesn't get you what you are
looking for?

Matt

-Original Message-
From: twsocket-boun...@elists.org [mailto:twsocket-boun...@elists.org] On
Behalf Of Xavier Mor-Mur
Sent: Wednesday, April 28, 2010 14:19
To: ICS support mailing
Subject: [twsocket] help to convert from utf8 to ansi (locale)

Hi to all

I need to parse text to send via email if there are declared any file.
If text is html and saved from word processors or html editors all chars out
of first 127 ASCII set are convert using utf8 convention.
What I need is recover original text to check if declared files exists.

First I was working with BCB5 but it have reduced support for unicode
strings.
Now I'm using BC2009 but I'm walking around the same point.

Example of I get as parameter and what I need to test :
from file I get "Sin%20t%C3%ADtulo%201_html_m5b7e3440.jpg"
and I need "Sin título1_html_m5b7e3440.jpg"

I played with ansi, wide, unicode, utf8 variables and functions with no
success.

Thanks in advance for your help.

--
Xavier Mor-Mur

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



Se certificó que el correo entrante no contiene virus.
Comprobada por AVG - www.avg.es
Versión: 9.0.814 / Base de datos de virus: 271.1.1/2840 - Fecha de la versión: 
04/28/10 08:27:00

   


--
Xavier Mor-Mur

--
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] help to convert from utf8 to ansi (locale)

2010-04-28 Thread Matt Minnis
The %## codes are representations of the character.  It looks like a URL
encoding scheme to me.
For example:  %20 is the space character. The %C3%AD looks to be the letter
i with the accent.
Run it though a URL Decoder and see if that doesn’t get you what you are
looking for?

Matt

-Original Message-
From: twsocket-boun...@elists.org [mailto:twsocket-boun...@elists.org] On
Behalf Of Xavier Mor-Mur
Sent: Wednesday, April 28, 2010 14:19
To: ICS support mailing
Subject: [twsocket] help to convert from utf8 to ansi (locale)

Hi to all

I need to parse text to send via email if there are declared any file.
If text is html and saved from word processors or html editors all chars out
of first 127 ASCII set are convert using utf8 convention.
What I need is recover original text to check if declared files exists.

First I was working with BCB5 but it have reduced support for unicode
strings.
Now I'm using BC2009 but I'm walking around the same point.

Example of I get as parameter and what I need to test :
from file I get "Sin%20t%C3%ADtulo%201_html_m5b7e3440.jpg"
and I need "Sin título1_html_m5b7e3440.jpg"

I played with ansi, wide, unicode, utf8 variables and functions with no
success.

Thanks in advance for your help.

--
Xavier Mor-Mur

--
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] Help on installing ICS

2009-10-09 Thread Arno Garrels
John Barrat wrote:
> Can you help?

> cannot resolve the unit name WSocket. 

Unit WSocket does not exist in both ICS V6 and V7, obviously
you are trying to compile an old V5 project.
To convert the old project first rename all ICS unit names in
the uses clause to OverbyteIcs. In most cases it
will compile afterwards. 

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


Re: [twsocket] Help please with HttpCli

2009-01-17 Thread Francois PIETTE
>I am just starting to use ICS and having problems with the demos.  My 
>problem is with the HttpGet
> demo program.  All works ok if the target Url domain is ok and the file 
> exists on the site, but if I make
> the filename invalid by adding a letter, I get an Exception thrown in 
> Delphi. Similar problem if I alter
> the domain by adding a letter, I get the Exception.
>
> I don't understand this, as I am running in a Try/Except block.  I also 
> have an OnRequestDone
> procedure coded, which I made to check for status code 404 (indicating 
> document not found).
>
> What simple error am I seeing please?

I cannot reproduce your problem: I tested with HttpGet sample program and 
exception is perfectly catched in GetButtonClick do display a correct error 
message.

btw: There is an exception thrown in Delphi, but this is perfectly normal 
and - as I said - is handled by the demo.

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


Re: [twsocket] Help with SmtpClient

2007-11-30 Thread [EMAIL PROTECTED]
Hello:

   The problem is on calling the Helo():  That method
is "asynchroneous", meaning that it does not wait for
the server's response before returning; it will
eventually trigger the OnRequestDone event when the
server's response arrives.

   However, you are using the Open() method, which
already sends the HELO command itself.  To fix your
problem, just remove the call to Helo(), and leave
Open() followed by Mail().  Open and Mail are
"synchrenous" methods.

   The SmtpCli component, as all other ICS
components, have built-in sync and async methods. 
The sync methods are for quick and easy development:
 you make the call and it will return when completed.
 The async methods are more advanced and require an
event-driven approach to programming, similar to the
style of the VCL itself.  Although it is a bit more
complicated, we always recommend you use the async
methods, which give you more control, and help keep
your application more responsive.

-dZ.


>--- Original Message ---
>From: Victor Gooch[mailto:[EMAIL PROTECTED]
>Sent: 11/30/2007 2:44:25 PM
>To  : twsocket@elists.org
>Cc  : 
>Subject : RE: [twsocket] Help with SmtpClient
>
 >I am using BCB6 with SmtpClient. My program
executes Open() then Helo() with no errors but when I
try to 
execute Mail() I get an error message that the
"Component is not Ready".  I have examined the property
settings several times but do not see why Mail() does
not work.  

is this a FAQ ?  Are there any suggestions?

thanks,
Victor
-- 
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] Help with SmtpClient

2007-11-30 Thread Francois PIETTE
>I am using BCB6 with SmtpClient. My program executes Open() 
> then Helo() with no errors but when I try to 
> execute Mail() I get an error message that the "Component is 
> not Ready".  I have examined the property
> settings several times but do not see why Mail() does not work.  

You are trying to use the asynchronous component as a synchronous one.

> is this a FAQ ?  Are there any suggestions?

See http://wiki.overbyte.be, there is an article about async programming.
You may also use the sync version but it is much less optimal.


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


Re: [twsocket] Help with SmtpClient

2007-11-30 Thread Arno Garrels
Victor Gooch wrote:
> I am using BCB6 with SmtpClient. My program executes Open() then
> Helo() with no errors but when I try to execute Mail() I get an error
> message that the "Component is not Ready".  I have examined the
> property settings several times but do not see why Mail() does not
> work.  
> 
> is this a FAQ ?  

Looks like that ;-) You get this error when you do not code event-driven.
Check this link: http://wiki.overbyte.be/wiki/index.php/Asynchronous_Paradigm
to get started.

--
Arno Garrels [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


Re: [twsocket] Help with re-install simply WSocket?

2007-08-19 Thread Arno Garrels
TK Boyd wrote:
> 
> "Cannot assign to read only property"
> 
> ... when it hits
> 
> FLogFile.Size:=0
> 
> ... in ICSLogger.

Yes, seems to be read only in D2, since D3 Size is read/write.
Eather try to change this line to FLogFile.Position := 0 (not 
sure whether that would work the same)
or define  NO_DEBUG_LOG  in the project options to exclude 
the IcsLogger component.

--
Arno Garrels [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
-- 
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] Help with re-install simply WSocket?

2007-08-19 Thread TK Boyd
Sorry I didn't follow up earlier suggestions more quickly... I wanted 
to research things further before asking again

To recap: I'm trying to install ICS on a Win98Se system, for use with 
Delphi2. I've done it before... but a while ago... so I MAY be help-
able!...

When I try to install even WSocket, my Delphi refuses, throwing 
up

"Cannot assign to read only property"

... when it hits

FLogFile.Size:=0

... in ICSLogger.

FLogFile is of type TFileStream, which is a Borland supplied 
descendant of TStream, with the "size" property read-only. I don't 
think the {+$J} directive is about getting around this sort of thing, 
is it? (I did try that route... from several directions... no luck.

My guess: I wonder if ICSLogger is an extra feature, added since the 
last time I installed ICS (the time I was successful with D2/Win98!) 
And, still guessing, ICSLogger uses something D2 unfriendly.

My hope: I'm wondering if it would be a huge task, or a wreck-the-
basic-features-of WSocket / WSocketE / WSocketS / HttpProt to take 
ICSLogger OUT of those ICS components, and get around the can't-
compile-with-D2 problem that way? I presume ICSLogger is something to 
log some information as packets travel back and forth? Can I live 
without it?

I'm not looking for a promise that I have the skill to take it out... 
but if you know it would be a futile exercise which would make any of 
the components I mentioned Just Not Work, I'd be grateful to be saved 
the time.

Tom

On 12 Aug 2007 at 19:08, Francois PIETTE wrote:

From:   "Francois PIETTE" <[EMAIL PROTECTED]>
To: "ICS support mailing" 
Date sent:      Sun, 12 Aug 2007 19:08:00 +0200
Subject:Re: [twsocket] Help with re-install simply WSocket?
Send reply to:  ICS support mailing 
<mailto:[EMAIL PROTECTED]>
<mailto:[EMAIL PROTECTED]>

> You have to change the options to have "writable const".
> 
> --
> [EMAIL PROTECTED]
> 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: "TK Boyd" <[EMAIL PROTECTED]>
> To: 
> Sent: Sunday, August 12, 2007 6:33 PM
> Subject: [twsocket] Help with re-install simply WSocket?
> 
> 
> > Sorry folks... Help?

> > === No need to read the rest!
> > 
> > Have a look at...
> > 
> > http://mon277rr.dyndns.org
> > 
> > ... if you are curious about what you are helping. That's a graph of
> > the weather where I am, about 8 days' worth. Red line: Outdoor
> > tture.
> > 
> > See
> > 
> > http://sheepdogsoftware.co.uk/ssds043.htm
> > 
> > if the visible-from-afar weather interests you.
> > 
> > http://sheepdogsoftware.co.uk  TK Boyd's site with
> > freeware and shareware for kids, parents, schools... and others.
> > (Apologies for the extra stuff below tacked on by Yahoo...)
> > 


http://sheepdogsoftware.co.uk  TK Boyd's site with
freeware and shareware for kids, parents, schools... and others.
(Apologies for the extra stuff below tacked on by Yahoo...)

-- 
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] Help with re-install simply WSocket?

2007-08-13 Thread Francois PIETTE
> Assignable Typed Constants

This is the correct option.

> ... but I could only get into that when I had a project open.

I don't remember very well D2, but the options for the library are for sure 
stored somewhere. If not, you can add in the offending source a compile time 
directive {$J+}. Normally this option is already somewhere in ICS source 
code.

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


Re: [twsocket] Help with re-install simply WSocket?

2007-08-12 Thread TK Boyd
Thank you for the quick reply... especially in support of an old 
environment.

I wrestled a bit with your suggestion... no joy. Maybe I 
misunderstood. More in a moment.

First a little "horn blowing" to reassure you that you're not dealing 
with a complete idiot: I'm delighted to say that I HAVE managed to 
install some core elements of ICS in a Delphi 4 / Win98SE 
environment. With that, I accomplished the "need it now" job but 
I'd still like to solve the "Install to Delphi 2 / Win98SE" problem.

You advised that my problem could be because I need to change the 
options to have "writable const". I tried... but I don't seem to have 
found the right thing. Is this a setting I make to my Delphi? Do I 
tweak the code from ics.zip?

The closest candidate I could find was in

Project - Options

... where there was a tickbox for

Assignable Typed Constants

... but I could only get into that when I had a project open.

Clarification of your suggestion would be welcome... sorry

Tom

On 12 Aug 2007 at 19:08, Francois PIETTE wrote:

From:   "Francois PIETTE" <[EMAIL PROTECTED]>
To: "ICS support mailing" 
Date sent:      Sun, 12 Aug 2007 19:08:00 +0200
Subject:Re: [twsocket] Help with re-install simply WSocket?
Send reply to:  ICS support mailing 
<mailto:[EMAIL PROTECTED]>
<mailto:[EMAIL PROTECTED]>

> You have to change the options to have "writable const".
> 
> --
> [EMAIL PROTECTED]
> 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: "TK Boyd" <[EMAIL PROTECTED]>
> To: 
> Sent: Sunday, August 12, 2007 6:33 PM
> Subject: [twsocket] Help with re-install simply WSocket?
> 
> 
> > Sorry folks... Help? About 2 years ago I set ICS up on a Win98
> > system with Delphi 2... I am not a complete idiot, I CAN do it... or
> > at least I could. Ideas on where I'm going wrong in the following
> > would be very welcome. I tried to repeat my previous triumph
> > but.. so far.. no joy.
> > 
> > I like to keep things simple. I like to keep my core Delphi system
> > as untouched as possible. So...
> > 
> > 12 Aug 07, I downloaded ics.zip (ICS-V5 Distribution) from Overbyte.
> > 
> > I unzipped it to a folder of it's own. (Yes, I kept the ics paths
> > intact.)
> > 
> > I backed up Delphi's cmplib32.dcl
> > 
> > I set up a sub-folder ("ICS") within Delphi's delphi 2.0\lib\ so
> > that my ICS stuff wouldn't be all mixed up with other components.
> > 
> > I copied icsdefs.inc, WSocket.pas and ICSlogger.pas to that
> > folder...
> > 
> > and then I tried (within a freshly started Delphi 2, no app-in-
> > development open. Win98SE environment.)
> > 
> > Component | Install | Add...
> > 
> > (I did what was necessary to get Delphi to "look" at the WSocket.pas
> > file)
> > 
> > On the first attempt, the compiler objected to a line in ICSLogger.
> > The line was...
> > 
> > "else
> >FLogFile.Size := 0;"
> > 
> > ... and the objection was...
> >
> > "Cannot assign to a read-only property"
> > 
> > 
> > Thoughts? I'm so frustrated! I know I have ICS working nicely on a
> > different computer, same Delphi (ver 2), same OS (Win98SE). Possible
> > a different ICS... I think it was abou 2005 I set it up on the other
> > machine.
> > 
> > Help?? Please??
> > 
> > ===
> > Further clue?
> > 
> > In desperation, I remmed out the offending line, and tried to
> > install the component again. (Yes, I realize it would have been an
> > unreliable component!)
> > 
> > This time the compiler fell over in WSocket.pas at
> > 
> >Status := WSocket_WSAIoctl(FHSocket,  SIO_KEEPALIVE_VALS,
> >   @KeepAliveIn,  SizeOf(KeepAliveIn),
> >   @KeepAliveOut, SizeOf(KeepAliveOut),
> >   BytesReturned, nil, nil);
> > 
> >  the error message was...
> > 
> > "Types of actual and formal var parameters must be identical"
> > 
> > Help will be much appreciated!
> > 
> > === No need to read the rest!
> > 
> > Have a look at...
> > 
> > http://mon277rr.dyndns.org
> > 
> > ... if you are curious about what you are he

Re: [twsocket] Help with re-install simply WSocket?

2007-08-12 Thread Francois PIETTE
You have to change the options to have "writable const".

--
[EMAIL PROTECTED]
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: "TK Boyd" <[EMAIL PROTECTED]>
To: 
Sent: Sunday, August 12, 2007 6:33 PM
Subject: [twsocket] Help with re-install simply WSocket?


> Sorry folks... Help? About 2 years ago I set ICS up on a Win98 system 
> with Delphi 2... I am not a complete idiot, I CAN do it... or at 
> least I could. Ideas on where I'm going wrong in the following would 
> be very welcome. I tried to repeat my previous triumph but.. so 
> far.. no joy.
> 
> I like to keep things simple. I like to keep my core Delphi system as 
> untouched as possible. So...
> 
> 12 Aug 07, I downloaded ics.zip (ICS-V5 Distribution) from Overbyte.
> 
> I unzipped it to a folder of it's own. (Yes, I kept the ics paths 
> intact.)
> 
> I backed up Delphi's cmplib32.dcl
> 
> I set up a sub-folder ("ICS") within Delphi's delphi 2.0\lib\ so that 
> my ICS stuff wouldn't be all mixed up with other components.
> 
> I copied icsdefs.inc, WSocket.pas and ICSlogger.pas to that folder...
> 
> and then I tried (within a freshly started Delphi 2, no app-in-
> development open. Win98SE environment.)
> 
> Component | Install | Add...
> 
> (I did what was necessary to get Delphi to "look" at the WSocket.pas 
> file)
> 
> On the first attempt, the compiler objected to a line in ICSLogger. 
> The line was...
> 
> "else
>FLogFile.Size := 0;"
> 
> ... and the objection was...
>
> "Cannot assign to a read-only property"
> 
> 
> Thoughts? I'm so frustrated! I know I have ICS working nicely on a 
> different computer, same Delphi (ver 2), same OS (Win98SE). Possible 
> a different ICS... I think it was abou 2005 I set it up on the other 
> machine.
> 
> Help?? Please??
> 
> ===
> Further clue?
> 
> In desperation, I remmed out the offending line, and tried to install 
> the component again. (Yes, I realize it would have been an unreliable 
> component!)
> 
> This time the compiler fell over in WSocket.pas at
> 
>Status := WSocket_WSAIoctl(FHSocket,  SIO_KEEPALIVE_VALS,
>   @KeepAliveIn,  SizeOf(KeepAliveIn),
>   @KeepAliveOut, SizeOf(KeepAliveOut),
>   BytesReturned, nil, nil);
> 
>  the error message was...
> 
> "Types of actual and formal var parameters must be identical"
> 
> Help will be much appreciated!
> 
> === No need to read the rest!
> 
> Have a look at...
> 
> http://mon277rr.dyndns.org
> 
> ... if you are curious about what you are helping. That's a graph of 
> the weather where I am, about 8 days' worth. Red line: Outdoor tture.
> 
> (Yes, there's a slight bug in the Quote Creator scraps of earlier 
> quotes are sometimes still on the screen.)
> 
> See
> 
> http://sheepdogsoftware.co.uk/ssds043.htm
> 
> if the visible-from-afar weather interests you.
> 
> 
> 
> 
> 
> http://sheepdogsoftware.co.uk  TK Boyd's site with
> freeware and shareware for kids, parents, schools... and others.
> (Apologies for the extra stuff below tacked on by Yahoo...)
> 
> -- 
> 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] Help in understanding Web Service

2007-02-05 Thread mike
Francois,

Thank you for the reply.

I did actually get a web page to be sent, but what I did was load a web page 
with
Stream->LoadFromFile(); So I am not sure why the dynamic virtual page was not
sent.

If you could send me the compiled version then I could test it and see if it 
works.
I am using Builder 5 just to let you know. 

Thanks

Mike

-Original Message-
>From: Francois PIETTE <[EMAIL PROTECTED]>
>Sent: Feb 4, 2007 10:10 AM
>To: ICS support mailing 
>Subject: Re: [twsocket] Help in understanding Web Service
>
>You probably have a problem with your ICS installation. Please download 
>again from my website and reinstall.
>If you want I can mail you the executable built with the latest release so 
>that you can verify it works on your system (in that case you ICS 
>installation is corrupted) or not (in that case your system has something 
>special - at least).
>
>--
>Contribute to the SSL Effort. Visit http://www.overbyte.be/eng/ssl.html
>--
>[EMAIL PROTECTED]
>http://www.overbyte.be
>
>
>- Original Message - 
>From: "mike" <[EMAIL PROTECTED]>
>To: "ICS support mailing" 
>Sent: Sunday, February 04, 2007 2:08 PM
>Subject: Re: [twsocket] Help in understanding Web Service
>
>
>> Hello,
>>
>> Well I have studied the webserv example more and seem to have a bit better 
>> understanding of what is happening, however I have some additional 
>> questions which I hope someone could answer for me.
>>
>> 1- In the sample, if a request comes in to send to the browser a web page 
>> indicated as "/time.htm", webserv is supposed to send back a virtual page 
>> constructed from within the sample. The virtual page consists of some 
>> basic html code which is built in a data stream and then the data stream 
>> is sent via the
>>
>> ((TMyHttpConnection *)Client)->SendStream();
>>
>> However the browser never receives this web page. I don't understand why 
>> this page would never be received by the browser. Could someone explain 
>> this to me or tell me how it should be sent to the browser.
>>
>> Thank you
>>
>> Mike
>>
>>
>> -- 
>> 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] Help in understanding Web Service

2007-02-04 Thread mike
Francois,

Thank you for the reply.

I did actually get a web page to be sent, but what I did was load a web page 
with  Stream->LoadFromFile(); So I am not sure why the dynamic virtual page was 
not sent.

If you could send me the compiled version then I could test it and see if it 
works. I am using Builder 5 just to let you know. 

Thanks

Mike


-Original Message-
>From: Francois PIETTE <[EMAIL PROTECTED]>
>Sent: Feb 4, 2007 10:10 AM
>To: ICS support mailing 
>Subject: Re: [twsocket] Help in understanding Web Service
>
>You probably have a problem with your ICS installation. Please download 
>again from my website and reinstall.
>If you want I can mail you the executable built with the latest release so 
>that you can verify it works on your system (in that case you ICS 
>installation is corrupted) or not (in that case your system has something 
>special - at least).
>
>--
>Contribute to the SSL Effort. Visit http://www.overbyte.be/eng/ssl.html
>--
>[EMAIL PROTECTED]
>http://www.overbyte.be
>
>
>- Original Message - 
>From: "mike" <[EMAIL PROTECTED]>
>To: "ICS support mailing" 
>Sent: Sunday, February 04, 2007 2:08 PM
>Subject: Re: [twsocket] Help in understanding Web Service
>
>
>> Hello,
>>
>> Well I have studied the webserv example more and seem to have a bit better 
>> understanding of what is happening, however I have some additional 
>> questions which I hope someone could answer for me.
>>
>> 1- In the sample, if a request comes in to send to the browser a web page 
>> indicated as "/time.htm", webserv is supposed to send back a virtual page 
>> constructed from within the sample. The virtual page consists of some 
>> basic html code which is built in a data stream and then the data stream 
>> is sent via the
>>
>> ((TMyHttpConnection *)Client)->SendStream();
>>
>> However the browser never receives this web page. I don't understand why 
>> this page would never be received by the browser. Could someone explain 
>> this to me or tell me how it should be sent to the browser.
>>
>> Thank you
>>
>> Mike
>>
>>
>> -- 
>> 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] Help in understanding Web Service

2007-02-04 Thread Francois PIETTE
You probably have a problem with your ICS installation. Please download 
again from my website and reinstall.
If you want I can mail you the executable built with the latest release so 
that you can verify it works on your system (in that case you ICS 
installation is corrupted) or not (in that case your system has something 
special - at least).

--
Contribute to the SSL Effort. Visit http://www.overbyte.be/eng/ssl.html
--
[EMAIL PROTECTED]
http://www.overbyte.be


- Original Message - 
From: "mike" <[EMAIL PROTECTED]>
To: "ICS support mailing" 
Sent: Sunday, February 04, 2007 2:08 PM
Subject: Re: [twsocket] Help in understanding Web Service


> Hello,
>
> Well I have studied the webserv example more and seem to have a bit better 
> understanding of what is happening, however I have some additional 
> questions which I hope someone could answer for me.
>
> 1- In the sample, if a request comes in to send to the browser a web page 
> indicated as "/time.htm", webserv is supposed to send back a virtual page 
> constructed from within the sample. The virtual page consists of some 
> basic html code which is built in a data stream and then the data stream 
> is sent via the
>
> ((TMyHttpConnection *)Client)->SendStream();
>
> However the browser never receives this web page. I don't understand why 
> this page would never be received by the browser. Could someone explain 
> this to me or tell me how it should be sent to the browser.
>
> Thank you
>
> Mike
>
>
> -- 
> 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] Help in understanding Web Service

2007-02-04 Thread mike
Hello,

Well I have studied the webserv example more and seem to have a bit better 
understanding of what is happening, however I have some additional questions 
which I hope someone could answer for me.

1- In the sample, if a request comes in to send to the browser a web page 
indicated as "/time.htm", webserv is supposed to send back a virtual page 
constructed from within the sample. The virtual page consists of some basic 
html code which is built in a data stream and then the data stream is sent via 
the 

((TMyHttpConnection *)Client)->SendStream();

However the browser never receives this web page. I don't understand why this 
page would never be received by the browser. Could someone explain this to me 
or tell me how it should be sent to the browser.

Thank you 

Mike


-- 
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] Help in understanding Web Service

2007-02-03 Thread mike
Bevan,

Thank you.

Ah, yes you are correct. To many late nights!!!

Mike

-Original Message-
>From: [EMAIL PROTECTED]
>Sent: Feb 3, 2007 9:06 PM
>To: twsocket@elists.org
>Subject: Re: [twsocket] Help in understanding Web Service
>
>Hi Mike,
>
>> I have a need to create a Web Server to answer requests from web browsers.
>> So I have tried the WebServ example but I am not sure how to send requests
>> to it. Here is what I tried;
>> 
>> 1- Ran the application on my windows XP machine and when I tried to start
>> the service on port 80 I received an exception stating the address is
>> already in use. (10048 error)
>
>So you have a web server running on your machine already - probably Personal 
>Web Server, or something like that.
>
>> 2- So I tried a different port (6080) and the service started ok.
>> 
>> 3- So now from Internet Explorer I tried to connect to the service with the
>> following
>> 
>> http://pavallion8000/webserv:6280/
>> 
>> and I received a web page stating ;
>> 
>> Forbidden
>> You don´t have permission to access /webserv:6280/ on this server.
>
>I think you want http://localhost:6080 or http://pavallion8000:6080
>
>Regards,
>
>Bevan
>
>
>
>
>

-- 
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] Help in understanding Web Service

2007-02-03 Thread bevan
Hi Mike,

> I have a need to create a Web Server to answer requests from web browsers.
> So I have tried the WebServ example but I am not sure how to send requests
> to it. Here is what I tried;
> 
> 1- Ran the application on my windows XP machine and when I tried to start
> the service on port 80 I received an exception stating the address is
> already in use. (10048 error)

So you have a web server running on your machine already - probably Personal 
Web Server, or something like that.

> 2- So I tried a different port (6080) and the service started ok.
> 
> 3- So now from Internet Explorer I tried to connect to the service with the
> following
> 
> http://pavallion8000/webserv:6280/
> 
> and I received a web page stating ;
> 
> Forbidden
> You don´t have permission to access /webserv:6280/ on this server.

I think you want http://localhost:6080 or http://pavallion8000:6080

Regards,

Bevan





-- 
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] Help on ICS's HTTP client component

2006-11-11 Thread Francois PIETTE
> So that's the end of it. It's the server that's causing my troubles...

Good to know.

> Is it worth using different time-out's for different stages of
> connection? Ex: use a long timeout for DNS queryes, use shorter timeout
> for the connection itself, use long timeouts for data transmission itself?

There is no general rule. It depends on what your application does.
I use a simple timout, something like 30". I start the timer before doing 
anything and then restart it in each step, including when data is received. 
If the timer triggers, then there was 30" since the last activity, whatever 
it was.

When a timeout is detected, I usually retry 3 times before letting the user 
know. After 3 retries, I just tell the user something goes wrong and he must 
try later. I record detailled errors in the log file but I do not bother the 
user with the details. I just say - like Microsoft - "The service is 
currently unavailable, try later".

--
Contribute to the SSL Effort. Visit http://www.overbyte.be/eng/ssl.html
--
[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


Re: [twsocket] Help on ICS's HTTP client component

2006-11-11 Thread Cosmin Prund
Francois Piette wrote:
> You should always implement timeout. Altough in your particular case, there
> may be a problem somewhere else. 
Good to know! Is there a "magic number" for the default timeout? What 
should we use?
Is it worth using different time-out's for different stages of 
connection? Ex: use a long timeout for DNS queryes, use shorter timeout 
for the connection itself, use long timeouts for data transmission itself?
> I suggest you use a sniffer to see why the
> connection doesn't establish with the webserver (The next state after
> httpDnsLookupDone is the connection). Using a sniffer (I suggest Ethereal,
> link from the links page at ICS website), you'll be able to see if the
> connection request packet is sent by your program and if the reply (positive
> or refused) come back from server. I guess the reply doesn't come back. Once
> we know that information, we'll be able to diagnose further.
>   
I took your advice and I downloaded ethereal, and that (almost) solved 
my problem. I wasn't able to actually get the system to fail while under 
the microscope but I did learn two valuable peaces of information:
(1) I'm not only connecting to the http server on my LAN, I'm also 
connecting to a http server very far away (my site is hosted in New 
York, I live in Romania so it's almost on the other side of the world)
(2) Ethereal showed clear signs of bad connections: duplicate ACK's, 
retransmissions, packets lost!

So that's the end of it. It's the server that's causing my troubles...

Thanks for your help!
Cosmin Prund
-- 
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] Help on ICS's HTTP client component

2006-11-10 Thread Francois Piette
> I did implement a kind of time-out mechanism into my download thing: if
> no event is triggered for a given amount (no state change, no data
> received, no error) I consider the connection to be "timed out". This
> gets my application back on the track working properly but this feels
> like a hack, it doesn't seem to be the right thing to do. Please correct
> me if I'm wrong!

You should always implement timeout. Altough in your particular case, there
may be a problem somewhere else. I suggest you use a sniffer to see why the
connection doesn't establish with the webserver (The next state after
httpDnsLookupDone is the connection). Using a sniffer (I suggest Ethereal,
link from the links page at ICS website), you'll be able to see if the
connection request packet is sent by your program and if the reply (positive
or refused) come back from server. I guess the reply doesn't come back. Once
we know that information, we'll be able to diagnose further.

btw: You may also try to use the same URL and same server with the demo
program HttpTst provided with ICS to see if it happends or not. If it
doesn't happend with HttpTst demo, then it is likely there is something
wrong with your code. If it happend with HttpTst, it is likely a problem of
the webserver, of a security product (firewall, antivirus,...) or maybe you
found a bug (Then trying with V6 beta could be useful since this version has
the latest code available).

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: "Cosmin Prund" <[EMAIL PROTECTED]>
To: 
Sent: Friday, November 10, 2006 3:13 PM
Subject: [twsocket] Help on ICS's HTTP client component


> Hello everyone.
>
>
> Note:
> This is a re-post of a message sent to the Talk list, with more detail
> on the problem. This message gets sent the second time to this list too.
>   I sent the first one before receiving elist's subscription
> confirmation so I don't think it went through.
>
> I'm having some trouble using the THttpCli component from the ICS suite.
> I'm using this component to simply download a document off a web site
> (the "document" might be a configuration file or a compressed DLL file
> or whatever). It mostly works but some times it just stops (gets stuck
> in a state - the last OnChangeState message I'm getting is
> httpDnsLookupDone) and then nothing happens. My application's GUI
> doesn't get stuck because Application's message pump is working, but the
> download doesn't finish ether. Or, if something does happen, I know
> nothing about it... Please note I'm using "GetAsync" to get my document.
>
> Extra information:
>
> I'm using the version of ICS marked "[ Download the latest ICS-V5
> Distribution ]" on http://www.overbyte.be/frame_index.html. Is V6 for
> "general consumption"? Should I try that?
> The web server I'm accessing is likely not the cause for this problem as
> the server is an Apache server running on a Windows machine on my LAN.
>
> I did implement a kind of time-out mechanism into my download thing: if
> no event is triggered for a given amount (no state change, no data
> received, no error) I consider the connection to be "timed out". This
> gets my application back on the track working properly but this feels
> like a hack, it doesn't seem to be the right thing to do. Please correct
> me if I'm wrong!
>
> Thanks,
> Cosmin Prund
>
> -- 
> 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] Help with SmtpCli

2006-06-18 Thread Arno Garrels
If I understand you correctly transfer hangs. Are you sure that
you pasted the last log lines, wasn't there a line ">."?
Have you tried another SMTP server yet?

---
Arno Garrels [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html 



Jock Terry wrote:
> I have a application that uses ics components for e-mailing a
> customer's purchase orders. The program is written in delphi 7 and
> when originally written worked fine, however the client that I wrote
> it for just started using it and it will not send the attachment that
> goes along with the email. 
> 
> My program and the demo program work, as long as I do not send the
> attachment file.
> 
> I get the same results for my program and for the demo send mail
> program,  MailSnd1.pas. Below is the info from the demo program. The
> ICS component is version 3.0.0.343. I have tried various setting,
> such as changing the default encoding.
> 
> Connecting to SMTP server...
> 220 smtp103.sbc.mail.mud.yahoo.com ESMTP
> < 220 smtp103.sbc.mail.mud.yahoo.com ESMTP
> RequestDone Rq=0 Error=0
> EHLO your_name
>  > EHLO your_name
> 250-smtp103.sbc.mail.mud.yahoo.com
> < 250-smtp103.sbc.mail.mud.yahoo.com
> 250-AUTH LOGIN PLAIN XYMCOOKIE
> < 250-AUTH LOGIN PLAIN XYMCOOKIE
> 250-PIPELINING
> < 250-PIPELINING
> 250 8BITMIME
> < 250 8BITMIME
> RequestDone Rq=10 Error=0
> AUTH LOGIN
>  > AUTH LOGIN
> 334 VXNlcm5hbWU6
> < 334 VXNlcm5hbWU6
> amV0Y29tc3lzQHNiY2dsb2JhbC5uZXQ=
>  > amV0Y29tc3lzQHNiY2dsb2JhbC5uZXQ=
> 334 UGFzc3dvcmQ6
> < 334 UGFzc3dvcmQ6
> amV0NTQ0NA==
>  > amV0NTQ0NA==
> 235 ok, go ahead (#2.0.0)
> < 235 ok, go ahead (#2.0.0)
> RequestDone Rq=11 Error=0
> MAIL FROM:<[EMAIL PROTECTED]>
>  > MAIL FROM:<[EMAIL PROTECTED]>
> 250 ok
> < 250 ok
> RequestDone Rq=2 Error=0
> RCPT TO:<[EMAIL PROTECTED]>
>  > RCPT TO:<[EMAIL PROTECTED]>
> 250 ok
> < 250 ok
> RequestDone Rq=4 Error=0
> DATA
>  > DATA
> 354 go ahead
> < 354 go ahead
>  > From: [EMAIL PROTECTED]
> Comments: This is a test
>  > To: [EMAIL PROTECTED]
>  > Subject: This is the message subject
>  > Sender: [EMAIL PROTECTED]
>  > Mime-Version: 1.0
>  > Content-Type: multipart/mixed;
>   boundary="= Multipart Boundary 0610060418"
>  > Date: Sat, 10 Jun 2006 04:18:06 -0500
>  > X-Priority: 2
>  > Priority: urgent
>  > X-MSMail-Priority: High
>  > Message-ID: <[EMAIL PROTECTED]>
>  > Disposition-Notification-To: [EMAIL PROTECTED]
>  > X-Mailer: ICS SMTP Component V2.50
>  >
>  > This is a multipart MIME message.
>  >
>  > --= Multipart Boundary 0610060418
>  > Content-Type: text/plain; charset="iso-8859-1"
>  > Content-Transfer-Encoding: 7bit
>  >
>  > This is the first line
>  > Then the second one
>  > The next one is empty
>  >
>  > The next one has only a single dot
>  > ..
>  > Finally the last one
>  >
>  > --= Multipart Boundary 0610060418
>  > Content-Type: image/gif;
>  > name="fp_small.gif"
>  > Content-Transfer-Encoding: base64
>  > Content-Disposition: attachment;
>  > filename="fp_small.gif"
>  >
>  >
> R0lGODlhXAB5APf/AP///wgICNbW1t7e3ufn5+/v7/f391JKSjkxMa2UlJyEhNa1tYxzc961  > 
> /9EKpCAJzTC01+0BE5TYFPwDaouaGDxE9Ct1LYdTkElEcFQDZEBtCaDd/IHQpqbMMNMGsiAJ
> RequestDone Rq=5 Error=10004
> 
> Note- I deleted the middle part of the file info. to reduce this
> email. 
> 
> I had to click on abort, after waiting 1 to 2 mins. And that's when I
> got the above winsock error.
> 
> BTW the connection is via DSL and a router.
> 
> Can anyone give me some help as to what is going on or what I am doing
> wrong.
> 
> Thanks for any help given
-- 
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] Help

2006-06-18 Thread Wilfried Mestdagh
Hello Jock,

Please use appropriatic subject. Many people will not even read a
subject without a given content !

> My program and the demo program work, as long as I do not send the
> attachment file.

You dont tell what the problem is. Since you say you get an error after
clicking Abort I assume it seems to take infinity to send the mail. To
check whatis going wrong, download SocketSpy (user made) and 'hang' it
between client and server.

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

Sunday, June 18, 2006, 16:17, Jock Terry wrote:

> I have a application that uses ics components for e-mailing a customer's
> purchase orders. The program is written in delphi 7 and when originally
> written worked fine, however the client that I wrote it for just started
> using it and it will not send the attachment that goes along with the email.

> My program and the demo program work, as long as I do not send the 
> attachment file.

> I get the same results for my program and for the demo send mail 
> program,  MailSnd1.pas. Below is the info from the demo program. The ICS
> component is version 3.0.0.343. I have tried various setting, such as 
> changing the default encoding.

> Connecting to SMTP server...
> 220 smtp103.sbc.mail.mud.yahoo.com ESMTP
> < 220 smtp103.sbc.mail.mud.yahoo.com ESMTP
> RequestDone Rq=0 Error=0
> EHLO your_name
 >> EHLO your_name
> 250-smtp103.sbc.mail.mud.yahoo.com
> < 250-smtp103.sbc.mail.mud.yahoo.com
> 250-AUTH LOGIN PLAIN XYMCOOKIE
> < 250-AUTH LOGIN PLAIN XYMCOOKIE
> 250-PIPELINING
> < 250-PIPELINING
> 250 8BITMIME
> < 250 8BITMIME
> RequestDone Rq=10 Error=0
> AUTH LOGIN
 >> AUTH LOGIN
> 334 VXNlcm5hbWU6
> < 334 VXNlcm5hbWU6
> amV0Y29tc3lzQHNiY2dsb2JhbC5uZXQ=
 >> amV0Y29tc3lzQHNiY2dsb2JhbC5uZXQ=
> 334 UGFzc3dvcmQ6
> < 334 UGFzc3dvcmQ6
> amV0NTQ0NA==
 >> amV0NTQ0NA==
> 235 ok, go ahead (#2.0.0)
> < 235 ok, go ahead (#2.0.0)
> RequestDone Rq=11 Error=0
> MAIL FROM:<[EMAIL PROTECTED]>
 >> MAIL FROM:<[EMAIL PROTECTED]>
> 250 ok
> < 250 ok
> RequestDone Rq=2 Error=0
> RCPT TO:<[EMAIL PROTECTED]>
 >> RCPT TO:<[EMAIL PROTECTED]>
> 250 ok
> < 250 ok
> RequestDone Rq=4 Error=0
> DATA
 >> DATA
> 354 go ahead
> < 354 go ahead
 >> From: [EMAIL PROTECTED]
> Comments: This is a test
 >> To: [EMAIL PROTECTED]
 >> Subject: This is the message subject
 >> Sender: [EMAIL PROTECTED]
 >> Mime-Version: 1.0
 >> Content-Type: multipart/mixed;
>   boundary="= Multipart Boundary 0610060418"
 >> Date: Sat, 10 Jun 2006 04:18:06 -0500
 >> X-Priority: 2
 >> Priority: urgent
 >> X-MSMail-Priority: High
 >> Message-ID: <[EMAIL PROTECTED]>
 >> Disposition-Notification-To: [EMAIL PROTECTED]
 >> X-Mailer: ICS SMTP Component V2.50
 >>
 >> This is a multipart MIME message.
 >>
 >> --= Multipart Boundary 0610060418
 >> Content-Type: text/plain; charset="iso-8859-1"
 >> Content-Transfer-Encoding: 7bit
 >>
 >> This is the first line
 >> Then the second one
 >> The next one is empty
 >>
 >> The next one has only a single dot
 >> ..
 >> Finally the last one
 >>
 >> --= Multipart Boundary 0610060418
 >> Content-Type: image/gif;
 >> name="fp_small.gif"
 >> Content-Transfer-Encoding: base64
 >> Content-Disposition: attachment;
 >> filename="fp_small.gif"
 >>
 >> R0lGODlhXAB5APf/AP///wgICNbW1t7e3ufn5+/v7/f391JKSjkxMa2UlJyEhNa1tYxzc961
 >> /9EKpCAJzTC01+0BE5TYFPwDaouaGDxE9Ct1LYdTkElEcFQDZEBtCaDd/IHQpqbMMNMGsiAJ
> RequestDone Rq=5 Error=10004

> Note- I deleted the middle part of the file info. to reduce this email.

> I had to click on abort, after waiting 1 to 2 mins. And that's when I 
> got the above winsock error.

> BTW the connection is via DSL and a router.

> Can anyone give me some help as to what is going on or what I am doing
> wrong.

> Thanks for any help given


-- 
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] Help file for FTPClient

2006-06-02 Thread Borosnyay Péter
> Why not make it compatible with RFC959 and return the correct response for
> the commands ?

Because we are in a hurry, and the colleague who wrote the microcontroller 
program didn't check the RFC, just picked a code whose description was best 
matching the situation. It is definitely an error. I will notify the colleague 
of this.
Thanks for giving information.

Peter

>
> --
> Contribute to the SSL Effort. Visit http://www.overbyte.be/eng/ssl.html
> --
> [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


Re: [twsocket] Help file for FTPClient

2006-06-01 Thread Francois PIETTE
>   ICS is professional. At least its FtpCLient is. Absolutely logical 
> structure and functionality.

Thanks for your favorable opinion.

> I don't know if some other PC FTP servers also send response 225 for
> STOR and RETR, but the previous FTP components
> I tried have accepted 225 by hand.

Response code 225 is not among STOR and RETR response as per RFC959. Code 
225 is only given for ABOR command.

> It's our company's own development.

Why not make it compatible with RFC959 and return the correct response for 
the commands ?

--
Contribute to the SSL Effort. Visit http://www.overbyte.be/eng/ssl.html
--
[EMAIL PROTECTED]
http://www.overbyte.be



- Original Message - 
From: "Borosnyay Péter" <[EMAIL PROTECTED]>
To: "ICS support mailing" 
Sent: Thursday, June 01, 2006 5:26 PM
Subject: Re: [twsocket] Help file for FTPClient


> Hi guys,
>
>   ICS is professional. At least its FtpCLient is. Absolutely logical 
> structure and functionality.
> I have successfully modified FtpCli.pas to accept response code 225 for 
> STOR and RETR. It was easy to find the corresponding Next2PutAsync and 
> Next2GetAsync procedures.
> This was needed because I communicate with a special custom engineered ARM 
> microcontroller driven hardware device. It is an onboard navigation 
> computer for public transport vehicles. It's our company's own 
> development. It uses GPS, GPRS, TCP, FTP protocols. If anybody is 
> interested in what we're doing, please contact me in a private mail.
>
> I don't know if some other PC FTP servers also send response 225 for STOR 
> and RETR, but the previous FTP components I tried have accepted 225 by 
> hand.
>
> Francois, if we get adequate information that FTP servers that send this 
> code do exist, please consider this mail as a modification suggestion.
>
> 225 Data connection open; no transfer in progress.
> I have decided to use FtpCli and ICS as widely as possible.
>
>
> Cheers,
>
> Peter Borosnyay
> Pécs, Hungary
>
>
> ps. notify me if no line breaks are uncomfortable.
>
> On Tue, 30 May 2006 21:54:42 +0200, Wilfried Mestdagh 
> <[EMAIL PROTECTED]> wrote:
>
>> Hello Peter,
>>
>>> being the final component I choose for my communications program
>>
>> Good I hope you succeed ! If you have any questions you can fire this
>> off in this mailing list. Lots of people are volonteer to standby...
>>
>>> At least I plan to do so.
>>
>> Keep in touch :)
>>
>> ---
>> Rgds, Wilfried [TeamICS]
>> http://www.overbyte.be/eng/overbyte/teamics.html
>> http://www.mestdagh.biz
>>
>> Tuesday, May 30, 2006, 18:14, Borosnyay Péter wrote:
>>
>>> Hello Wilfried,
>>
>>> I dl'ed ICS today morning so I'm not in the position to help yet ...
>>> But I will experiment with it this week, it has a good chance of
>>> being the final component I choose for my communications program in
>>> our GPS navigation system at the local transport company of the second
>>> biggest city in Hungary.
>>> If I succeed and get my money I will either donate or do something 
>>> useful for you.
>>> At least I plan to do so.
>>
>>> Bests,
>>> Peter
>>
>>> On Tue, 30 May 2006 15:18:06 +0200, Wilfried Mestdagh 
>>> <[EMAIL PROTECTED]> wrote:
>>
>
> -- 
> 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] Help file for FTPClient

2006-06-01 Thread Borosnyay Péter
Hi guys,

   ICS is professional. At least its FtpCLient is. Absolutely logical structure 
and functionality.
I have successfully modified FtpCli.pas to accept response code 225 for STOR 
and RETR. It was easy to find the corresponding Next2PutAsync and Next2GetAsync 
procedures.
This was needed because I communicate with a special custom engineered ARM 
microcontroller driven hardware device. It is an onboard navigation computer 
for public transport vehicles. It's our company's own development. It uses GPS, 
GPRS, TCP, FTP protocols. If anybody is interested in what we're doing, please 
contact me in a private mail.

I don't know if some other PC FTP servers also send response 225 for STOR and 
RETR, but the previous FTP components I tried have accepted 225 by hand.

Francois, if we get adequate information that FTP servers that send this code 
do exist, please consider this mail as a modification suggestion.

225 Data connection open; no transfer in progress.
I have decided to use FtpCli and ICS as widely as possible.


Cheers,

Peter Borosnyay
Pécs, Hungary


ps. notify me if no line breaks are uncomfortable.

On Tue, 30 May 2006 21:54:42 +0200, Wilfried Mestdagh <[EMAIL PROTECTED]> wrote:

> Hello Peter,
>
>> being the final component I choose for my communications program
>
> Good I hope you succeed ! If you have any questions you can fire this
> off in this mailing list. Lots of people are volonteer to standby...
>
>> At least I plan to do so.
>
> Keep in touch :)
>
> ---
> Rgds, Wilfried [TeamICS]
> http://www.overbyte.be/eng/overbyte/teamics.html
> http://www.mestdagh.biz
>
> Tuesday, May 30, 2006, 18:14, Borosnyay Péter wrote:
>
>> Hello Wilfried,
>
>> I dl'ed ICS today morning so I'm not in the position to help yet ...
>> But I will experiment with it this week, it has a good chance of
>> being the final component I choose for my communications program in
>> our GPS navigation system at the local transport company of the second
>> biggest city in Hungary.
>> If I succeed and get my money I will either donate or do something useful 
>> for you.
>> At least I plan to do so.
>
>> Bests,
>> Peter
>
>> On Tue, 30 May 2006 15:18:06 +0200, Wilfried Mestdagh <[EMAIL PROTECTED]> 
>> wrote:
>

-- 
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] Help file for FTPClient

2006-05-30 Thread Wilfried Mestdagh
Hello Peter,

> being the final component I choose for my communications program

Good I hope you succeed ! If you have any questions you can fire this
off in this mailing list. Lots of people are volonteer to standby...

> At least I plan to do so.

Keep in touch :)

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

Tuesday, May 30, 2006, 18:14, Borosnyay Péter wrote:

> Hello Wilfried,

> I dl'ed ICS today morning so I'm not in the position to help yet ...
> But I will experiment with it this week, it has a good chance of
> being the final component I choose for my communications program in
> our GPS navigation system at the local transport company of the second
> biggest city in Hungary.
> If I succeed and get my money I will either donate or do something useful for 
> you.
> At least I plan to do so.

> Bests,
> Peter

> On Tue, 30 May 2006 15:18:06 +0200, Wilfried Mestdagh <[EMAIL PROTECTED]> 
> wrote:

>> Hello Peter,
>>
>> Correct. There is already some framework on http://wiki.overbyte.be but
>> all still need to be done. You are of course welcome to help :) And also
>> this is the best learning tool ever exists :)
>>
>> ---
>> Rgds, Wilfried [TeamICS]
>> http://www.overbyte.be/eng/overbyte/teamics.html
>> http://www.mestdagh.biz
>>
>> Tuesday, May 30, 2006, 14:13, Borosnyay Péter wrote:
>>
>>> Hello everybody,
>>
>>>I couldn't find help files for FTPClient (I mean the
>>> descriptions of properties, events and methods) neither in the
>>> package, nor on overbyte.be and in the faq. Help is probably not
>>> available yet.
>>
>>> Am I right ?
>>
>>> Cheers,
>>> Peter
>>
>>



> -- 
> FIGYELEM !  Ennek a levélnek a végén NINCS REKLÁM !!!
> észrevetted ?


-- 
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] Help file for FTPClient

2006-05-30 Thread Borosnyay Péter
Hello Wilfried,

I dl'ed ICS today morning so I'm not in the position to help yet ...
But I will experiment with it this week, it has a good chance of being the 
final component I choose for my communications program in our GPS navigation 
system at the local transport company of the second biggest city in Hungary.
If I succeed and get my money I will either donate or do something useful for 
you.
At least I plan to do so.

Bests,
Peter

On Tue, 30 May 2006 15:18:06 +0200, Wilfried Mestdagh <[EMAIL PROTECTED]> wrote:

> Hello Peter,
>
> Correct. There is already some framework on http://wiki.overbyte.be but
> all still need to be done. You are of course welcome to help :) And also
> this is the best learning tool ever exists :)
>
> ---
> Rgds, Wilfried [TeamICS]
> http://www.overbyte.be/eng/overbyte/teamics.html
> http://www.mestdagh.biz
>
> Tuesday, May 30, 2006, 14:13, Borosnyay Péter wrote:
>
>> Hello everybody,
>
>>I couldn't find help files for FTPClient (I mean the
>> descriptions of properties, events and methods) neither in the
>> package, nor on overbyte.be and in the faq. Help is probably not
>> available yet.
>
>> Am I right ?
>
>> Cheers,
>> Peter
>
>



-- 
FIGYELEM !  Ennek a levélnek a végén NINCS REKLÁM !!!
észrevetted ?

-- 
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] Help file for FTPClient

2006-05-30 Thread Francois Piette
>I couldn't find help files for FTPClient (I mean the descriptions of
properties,
> events and methods) neither in the package, nor on overbyte.be and in the
faq.
> Help is probably not available yet.
> Am I right ?

Almost. See the source code (component and sample program). You'll find
valuable help in the comments and of course you'll find all properties,
methods and events. I always use significant names so you should not have
too much difficulties.
--
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://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Help file for FTPClient

2006-05-30 Thread Wilfried Mestdagh
Hello Peter,

Correct. There is already some framework on http://wiki.overbyte.be but
all still need to be done. You are of course welcome to help :) And also
this is the best learning tool ever exists :)

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

Tuesday, May 30, 2006, 14:13, Borosnyay Péter wrote:

> Hello everybody,

>I couldn't find help files for FTPClient (I mean the
> descriptions of properties, events and methods) neither in the
> package, nor on overbyte.be and in the faq. Help is probably not
> available yet.

> Am I right ?

> Cheers,
> Peter


-- 
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] [HELP] THttpServer

2006-04-11 Thread Guillaume MAISON
Francois PIETTE a écrit :
>> Yop ! it works ! Thanks a lot François !
> 
> I don't know your application, but maybe the template feature would be 
> interesting for you. It is very powerful. For a demo, see 
> TWebServForm.CreateVirtualDocument_Template.
> 
> The principle is simple: you prvide a HTML template with special tags. Those 
> tags are replaced by values computed by your program. This way you can 
> separate presentation (the HTML) from the code which produce data values. 
> Very powerful and easy to use.

The thing is that i'm not using the webserver as a "HTML provider" but much 
more like a HTTP provider.
I'm sending and getting back XML files using a http server.

i needed a convenient way to do the following :
the client part of my application needs to send xml request. Some requests are 
sent through the internet to a PHP/MySQL http 
server that sends back a xml result.

The thing is that this application might be run also in a "standalone" mode. 
that's why, instead of having several client 
interface, i have added to the client application a small http server that is 
used to handle all the requests...

much easier way to proceed :)

but thanks for the hint !

-- 

Guillaume MAISON
eXpress Network Agen - [EMAIL PROTECTED]
83, Cours Victor Hugo
47000 AGEN
Tél : +33 5 53 87 91 48
Mobile  : +33 6 30 14 91 23
Fax : +33 5 53 68 73 50
e-mail  : [EMAIL PROTECTED]
Web : http://nauteus.com

Mon Profil sur Viaduc: 
http://www.viaduc.com/public/profil/?memberId=0021oz963uuea795
Vous inscrire sur Viaduc : 
http://www.viaduc.com/invitationpersonnelle/0021oz963uuea795
-- 
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] [HELP] THttpServer

2006-04-11 Thread Francois PIETTE
>>> do i have to do like :
>>> ClientCnx.AnswerStream();
>>> ClientCnx.Docstream:=;
>>> ClientCnx.SendStream;
>>
>> Forget anbout the two last lines !
>> Have a look at THttpConnection.AnswerStream and you'll understand.
>
> Yop ! it works ! Thanks a lot François !

I don't know your application, but maybe the template feature would be 
interesting for you. It is very powerful. For a demo, see 
TWebServForm.CreateVirtualDocument_Template.

The principle is simple: you prvide a HTML template with special tags. Those 
tags are replaced by values computed by your program. This way you can 
separate presentation (the HTML) from the code which produce data values. 
Very powerful and easy to use.

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


Re: [twsocket] [HELP] THttpServer

2006-04-11 Thread Guillaume MAISON
Francois PIETTE a écrit :
>> do i have to do like :
>> ClientCnx.AnswerStream();
>> ClientCnx.Docstream:=;
>> ClientCnx.SendStream;
> 
> Forget anbout the two last lines !
> Have a look at THttpConnection.AnswerStream and you'll understand.

Yop ! it works ! Thanks a lot François !

regards,

-- 

Guillaume MAISON
eXpress Network Agen - [EMAIL PROTECTED]
83, Cours Victor Hugo
47000 AGEN
Tél : +33 5 53 87 91 48
Mobile  : +33 6 30 14 91 23
Fax : +33 5 53 68 73 50
e-mail  : [EMAIL PROTECTED]
Web : http://nauteus.com

Mon Profil sur Viaduc: 
http://www.viaduc.com/public/profil/?memberId=0021oz963uuea795
Vous inscrire sur Viaduc : 
http://www.viaduc.com/invitationpersonnelle/0021oz963uuea795
-- 
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] [HELP] THttpServer

2006-04-11 Thread Francois PIETTE
> do i have to do like :
> ClientCnx.AnswerStream();
> ClientCnx.Docstream:=;
> ClientCnx.SendStream;

Forget anbout the two last lines !
Have a look at THttpConnection.AnswerStream and you'll understand.

--
Contribute to the SSL Effort. Visit http://www.overbyte.be/eng/ssl.html
--
[EMAIL PROTECTED]
http://www.overbyte.be



- Original Message - 
From: "Guillaume MAISON" <[EMAIL PROTECTED]>
To: "ICS support mailing" 
Sent: Tuesday, April 11, 2006 6:21 PM
Subject: [twsocket] [HELP] THttpServer


> Hi guys,
>
> i must be blind at this time but i don't know how to send back the content 
> of a stream.
>
> i explain :
> i receive a http request with posted data. everything runs fine, i can 
> have the posted content and analyze it, process it
> and then at the stage of returning the resulting stream... i don't know 
> how to do it...
>
> do i have to do like :
> ClientCnx.AnswerStream();
> ClientCnx.Docstream:=;
> ClientCnx.SendStream;
>
> 
>
> thanks in advance for your help !
>
> -- 
>
> Guillaume MAISON
> eXpress Network Agen - [EMAIL PROTECTED]
> 83, Cours Victor Hugo
> 47000 AGEN
> Tél : +33 5 53 87 91 48
> Mobile  : +33 6 30 14 91 23
> Fax : +33 5 53 68 73 50
> e-mail  : [EMAIL PROTECTED]
> Web : http://nauteus.com
>
> Mon Profil sur Viaduc: 
> http://www.viaduc.com/public/profil/?memberId=0021oz963uuea795
> Vous inscrire sur Viaduc : 
> http://www.viaduc.com/invitationpersonnelle/0021oz963uuea795
> -- 
> 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] Help to retrieve datetime from sntp server

2006-03-09 Thread Xavier Mor-Mur
Thanks Angus for your  quick reply.
I download your component and will check it.

Best regards
Xavier

En/na Angus Robertson - Magenta Systems Ltd ha escrit:
>> I need write o function to retrieve date-time from a timeservers.
>> This is needed to prevent changes on date and/or time on local 
>> network pc's, included local server, because I should upload/download 
>> small files which need real date time assigned.
>>
>> I take a look to TWSTimeClient from Chris Barber found at usermade 
>> page, but I can't get write a working program.
>> 
>
> That client did not support SNTP, only the old time protocol that uses 
> whole seconds and does not allow for the round trip time.  I updated it 
> many years ago for SNTP and to add UTC functions to change the PC time.  
>
> I also updated Nathan Anderson's time server component to support SNTP. 
>
> You can download both from my ICS page:  
>
> http://www.magsys.co.uk/delphi/magics.asp
>
> Sorry, there is no demo program, but I use them myself hourly in my DUN 
> Manager application.  I strongly recommend you compare the results of 
> two time servers before actually changing the PC time, you'd be 
> surprised how often time servers return bad time. 
>
> Angus
>   

-- 
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] Help to retrieve datetime from sntp server

2006-03-08 Thread Angus Robertson - Magenta Systems Ltd
> I need write o function to retrieve date-time from a timeservers.
> This is needed to prevent changes on date and/or time on local 
> network pc's, included local server, because I should upload/download 
> small files which need real date time assigned.
> 
> I take a look to TWSTimeClient from Chris Barber found at usermade 
> page, but I can't get write a working program.

That client did not support SNTP, only the old time protocol that uses 
whole seconds and does not allow for the round trip time.  I updated it 
many years ago for SNTP and to add UTC functions to change the PC time.  

I also updated Nathan Anderson's time server component to support SNTP. 

You can download both from my ICS page:  

http://www.magsys.co.uk/delphi/magics.asp

Sorry, there is no demo program, but I use them myself hourly in my DUN 
Manager application.  I strongly recommend you compare the results of 
two time servers before actually changing the PC time, you'd be 
surprised how often time servers return bad time. 

Angus
-- 
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] [HELP] Question...

2006-02-21 Thread Guillaume MAISON
Arno Garrels a écrit :
> Guillaume MAISON wrote:
>> In that case, the property SocksLevel should be initialized at the
>> component creation with a value. Which is not the case in the 
>> source code... As i've not changed my code...
> 
> Strange I don't have that problem. It is assigned default value '5'
> in both V5 and V6 see WSocket.pas and OverbyteIcsWSocket.
> 
> procedure TCustomSocksWSocket.AssignDefaultValue;
> begin
> inherited AssignDefaultValue;
> ...
> FSocksLevel  := '5';
> 
> Arno

Well, the problem comes from HttpProt (1768) in the THttpCli.DoBeforeConnect 
procedure.

procedure THttpCli.DoBeforeConnect;
begin
 FCtrlSocket.Addr:= FDnsResult;
 FCtrlSocket.LocalAddr   := FLocalAddr; {bb}
 FCtrlSocket.Port:= FPort;
 FCtrlSocket.Proto   := 'tcp';
 FCtrlSocket.SocksServer := FSocksServer; *<-- Here where 
THttpCli.FSocksServer is set by default to ''*
 FCtrlSocket.SocksLevel  := FSocksLevel;
 FCtrlSocket.SocksPort   := FSocksPort;
 FCtrlSocket.SocksUsercode   := FSocksUsercode;
 FCtrlSocket.SocksPassword   := FSocksPassword;
 FCtrlSocket.SocksAuthentication := FSocksAuthentication;
end;

Is it a bug ? Is it a plane ? no, it's superman ;)

-- 

Guillaume MAISON - [EMAIL PROTECTED]
83, Cours Victor Hugo
47000 AGEN
Tél : 05 53 87 91 48 - Fax : 05 53 68 73 50
e-mail : [EMAIL PROTECTED] - Web : http://nauteus.com

-- 
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] [HELP] Question...

2006-02-20 Thread Arno Garrels
Guillaume MAISON wrote:
> Arno Garrels a écrit :
>> Guillaume MAISON wrote:
>>> And, effectively, the NewValue is '', as i don't need it
>> 
>> Whether to use or not to use Socks is specified via property
>> SocksAuthentication, in your case socksNoAuthentication, property
>> SocksLevel may not be empty. 
>> 
> In that case, the property SocksLevel should be initialized at the
> component creation with a value. Which is not the case in the 
> source code... As i've not changed my code...

Strange I don't have that problem. It is assigned default value '5'
in both V5 and V6 see WSocket.pas and OverbyteIcsWSocket.

procedure TCustomSocksWSocket.AssignDefaultValue;
begin
inherited AssignDefaultValue;
...
FSocksLevel  := '5';

Arno

> 
> --
> 
> Guillaume MAISON - [EMAIL PROTECTED]
> 83, Cours Victor Hugo
> 47000 AGEN
> Tél : 05 53 87 91 48 - Fax : 05 53 68 73 50
> e-mail : [EMAIL PROTECTED] - Web : http://nauteus.com
-- 
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] [HELP] Question...

2006-02-20 Thread Guillaume MAISON
Arno Garrels a écrit :
> Guillaume MAISON wrote:
>> And, effectively, the NewValue is '', as i don't need it
> 
> Whether to use or not to use Socks is specified via property 
> SocksAuthentication,
> in your case socksNoAuthentication, property SocksLevel may not be empty.
> 
In that case, the property SocksLevel should be initialized at the component 
creation with a value. Which is not the case in the 
source code... As i've not changed my code...

-- 

Guillaume MAISON - [EMAIL PROTECTED]
83, Cours Victor Hugo
47000 AGEN
Tél : 05 53 87 91 48 - Fax : 05 53 68 73 50
e-mail : [EMAIL PROTECTED] - Web : http://nauteus.com

-- 
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] [HELP] Question...

2006-02-20 Thread Arno Garrels
Guillaume MAISON wrote:
> 
> And, effectively, the NewValue is '', as i don't need it

Whether to use or not to use Socks is specified via property 
SocksAuthentication,
in your case socksNoAuthentication, property SocksLevel may not be empty.

Arno

> Any clue someone ?
> 
> --
> 
> Guillaume MAISON - [EMAIL PROTECTED]
> 83, Cours Victor Hugo
> 47000 AGEN
> Tél : 05 53 87 91 48 - Fax : 05 53 68 73 50
> e-mail : [EMAIL PROTECTED] - Web : http://nauteus.com
-- 
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] Help Files ?

2005-11-19 Thread Francois PIETTE
> I have succesfully managed a test version with your
> FTP component by refering to your examples.
> Thank You.
> I have been hunting for the Help files to get a deeper
> insight of the components but could not find them, can
> you help ?

There is not up to date help file available.
The best help is in the source code: the component source code and the 
samples source code. You can easily find all the properties, events and 
method in the component source code. Most names are self explanatory. There 
are also a lot of comments.

Then if it is not enough, you have a FAQ and a support mailing list with 
searchable archive. See "support" link at my website.

This being said, we are still looking for someone to make a good help file. 
Various project has been started in the past but none was ever finished :-(

--
Contribute to the SSL Effort. Visit http://www.overbyte.be/eng/ssl.html
--
[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


Re: [twsocket] [HELP] Question about starting THttpServer and TFtpServer

2005-11-09 Thread Guillaume MAISON
Angus Robertson - Magenta Systems Ltd a écrit :
>>are the Start procedures, from ThttpServer and TFtpServer, blocking 
>>procedures or not ?
> 
> 
> No, they just set the server to listen for incoming sessions.
> 
> Angus

Thanks to both !

Best regards,

-- 

Guillaume MAISON - [EMAIL PROTECTED]
83, Cours Victor Hugo
47000 AGEN
Tél : 05 53 87 91 48 - Fax : 05 53 68 73 50
e-mail : [EMAIL PROTECTED] - Web : http://nauteus.com

-- 
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] [HELP] Question about starting THttpServer and TFtpServer

2005-11-09 Thread Angus Robertson - Magenta Systems Ltd
> are the Start procedures, from ThttpServer and TFtpServer, blocking 
> procedures or not ?

No, they just set the server to listen for incoming sessions.

Angus
-- 
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] [HELP] Question about starting THttpServer and TFtpServer

2005-11-09 Thread Fastream Technologies
Hello Guillaume,

They start the server immediately however the server needs a message pump to 
work.

Best Regards,

SubZ

- Original Message - 
From: "Guillaume MAISON" <[EMAIL PROTECTED]>
To: "ICS support mailing" 
Sent: Wednesday, November 09, 2005 5:25 PM
Subject: [twsocket] [HELP] Question about starting THttpServer and 
TFtpServer


Hi everyone,

Just a small question which answer should be short ;) :

are the Start procedures, from ThttpServer and TFtpServer, blocking
procedures or not ?

Thanks in advance !

-- 

Guillaume MAISON - [EMAIL PROTECTED]
83, Cours Victor Hugo
47000 AGEN
Tél : 05 53 87 91 48 - Fax : 05 53 68 73 50
e-mail : [EMAIL PROTECTED] - Web : http://nauteus.com

-- 
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] [HELP] HttpCli and Upload files... FORGET MY MAIL ; )

2005-07-26 Thread Francois PIETTE
> that's something i haven't found anywhere on the net ?

Maybe in the documents related to MIME ?

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


- Original Message - 
From: "Guillaume MAISON" <[EMAIL PROTECTED]>
To: "ICS support mailing" 
Sent: Tuesday, July 26, 2005 4:39 PM
Subject: Re: [twsocket] [HELP] HttpCli and Upload files... FORGET MY MAIL 
; )


>> Hi everyone,
>>
>> I want to send some files using ThttpCli and the Post Method.
>> i've searched through the ML for code samples, etc...
>>
>> Based upon what i've found, here's the code i've written (based upon 
>> ICS's httpPost example) :
>>
>
> Right right right...
>
> as usual, i need to pollute the ML just before finding myself the 
> solution...
>
> i'm desperatly sorry for the inconvenience...
>
> if anyone here comes by AGEN in France, i'd greatly offer a drink ;)
> well not all at the same time uh ?
>
> anyway, just a small question to end :
>
> where is it mentionned that when you define a boundary,
> the http header
> Content-type: multipart/form-data; boundary=-boundary
> needs two -- less than the boundaries mentioned in the data after ?
>
> that's something i haven't found anywhere on the net ?
>
> Thanks !
>
> Best regards,
>
> Guillaume MAISON
> -
> Guillaume MAISON - [EMAIL PROTECTED]
> 83, Cours Victor Hugo
> 47000 AGEN
> Tél : 05 53 87 91 48 - Fax : 05 53 68 73 50
> e-mail : [EMAIL PROTECTED] - Web : http://nauteus.com
>
> -- 
> 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] [HELP] HttpCli and Upload files...

2005-07-26 Thread Francois Piette
> with the sample code above, the apache/php server doesn't see any
> POST data with firefox it does...
> although i don't see any difference...
> anyone any idea ?

Cookie expected by the Apache server ?

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

- Original Message - 
From: "Guillaume MAISON" <[EMAIL PROTECTED]>
To: 
Sent: Tuesday, July 26, 2005 4:25 PM
Subject: [twsocket] [HELP] HttpCli and Upload files...


> Hi everyone,
>
> I want to send some files using ThttpCli and the Post Method.
> i've searched through the ML for code samples, etc...
>
> Based upon what i've found, here's the code i've written (based upon ICS's 
> httpPost example) :
>
> procedure THttpPostForm.PostButtonClick(Sender: TObject);
> var
> Data : String;
> crlf : String;
> lFs : TMemoryStream;
> lBoundary:string;
> begin
>  crlf:=#13#10;
>  lBoundary:='---01myboundary2';
>  HttpCli1.ContentTypePost:='multipart/form-data; boundary='+lBoundary;
>
>  Data:=lBoundary+#13#10;
>  Data:=Data+'Content-Disposition: form-data; 
> name="FirstName"'#13#10#13#10;
>  Data:=Data+Trim(FirstNameEdit.Text)+#13#10;
>  Data:=Data+lBoundary+#13#10;
>  Data:=Data+'Content-Disposition: form-data; name="LastName"'#13#10#13#10;
>  Data:=Data+Trim(LastNameEdit.Text)+#13#10;
>  Data:=Data+lBoundary+#13#10;
>  Data:=Data+'Content-Disposition: form-data; name="Submit"'#13#10#13#10;
>  Data:=Data+'Submit'+#13#10;
>
>
> {Data := 'FirstName=' + UrlEncode(Trim(FirstNameEdit.Text)) + '&' +
> 'LastName='  + UrlEncode(Trim(LastNameEdit.Text))  + '&' +
> 'Submit=Submit';}
> HttpCli1.SendStream := TMemoryStream.Create;
> HttpCli1.SendStream.Write(Data[1], Length(Data));
> if ffileName<>'' then
> Begin
>  lFs:=TMemoryStream.Create;
>  lFs.LoadFromFile(fFileName);
>  Data:=lBoundary+#13#10;
>  Data:=Data+'Content-Disposition: form-data; name="monfichier";
filename="'+fFileName+'"'+crlf;
>  Data:=Data+'Content-type: application/zip'+crlf+crlf;
>  HttpCli1.SendStream.Write(Data[1], Length(Data));
>  lFs.SaveToStream(HttpCli1.SendStream);
>  HttpCli1.SendStream.Write(crlf[1], Length(crlf));
> End;
> Data:=lBoundary+'--'+crlf;
> HttpCli1.SendStream.Write(Data[1], length(data));
> HttpCli1.SendStream.Seek(0, 0);
> HttpCli1.RcvdStream := TMemoryStream.Create;
> HttpCli1.URL := Trim(ActionURLEdit.Text);
> HttpCli1.PostAsync;
> end;
>
> using the WebServ application, here's what the c:\data.bin file says :
> DATA
> Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*
> Content-Type: multipart/form-data; 
> boundary=---01myboundary2
> User-Agent: Mozilla/4.0 (compatible; ICS)
> Host: localhost:8080
> Content-Length: 349
> ---01myboundary2
> Content-Disposition: form-data; name="FirstName"
>
> Guillaume
> ---01myboundary2
> Content-Disposition: form-data; name="LastName"
>
> MAISON
> ---01myboundary2
> Content-Disposition: form-data; name="Submit"
>
> Submit
> ---01myboundary2--
> DATA
>
> using the form mentionned in the webserv demo
> here's what firefox sends (according to c:\data.bin):
> DATA
> Host: localhost:8080
> User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; fr-FR; rv:1.7.9) 
> Gecko/20050713 Firefox/1.0.5
> Accept:
text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
> Accept-Language: fr,fr-fr;q=0.8,en-us;q=0.5,en;q=0.3
> Accept-Encoding: gzip,deflate
> Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
> Keep-Alive: 300
> Connection: keep-alive
> Cache-Control: max-age=0
> Content-Type: multipart/form-data; 
> boundary=---2921238217421
> Content-Length: 358
> -2921238217421
> Content-Disposition: form-data; name="FirstName"
>
> Guillaume
> -2921238217421
> Content-Disposition: form-data; name="LastName"
>
> MAISON
> -2921238217421
> Content-Disposition: form-data; name="Submit"
>
> Button
> -2921238217421--
> DATA
>
> everything seems same, except for few more headers sent by firefox...
>
> well, seems same... but is not...
>
> when using the very same code (or form) against an apache server with PHP,
> i don't have the same result...
> with the sample code above, the apache/php server doesn't see any POST data
> with firefox it does...
>
> although i don't see any difference...
>
> anyone any idea ?
>
> or any sample code that works ;) ;)
>
> Guillaume MAISON
> -
> Guillaume MAISON - [EMAIL PROTECTED]
> 83, Cours Victor Hugo
> 47000 AGEN
> Tél : 05 53 87 91 48 - Fax : 05 53 68 73 50
> e-mail : [EMAIL PROTECTED] - Web : http://nauteus.com
>
> -- 
> To unsubscrib

Re: [twsocket] [HELP] HttpCli and Upload files... FORGET MY MAIL ; )

2005-07-26 Thread Guillaume MAISON
> Hi everyone,
> 
> I want to send some files using ThttpCli and the Post Method.
> i've searched through the ML for code samples, etc...
> 
> Based upon what i've found, here's the code i've written (based upon ICS's 
> httpPost example) :
> 

Right right right...

as usual, i need to pollute the ML just before finding myself the solution...

i'm desperatly sorry for the inconvenience... 

if anyone here comes by AGEN in France, i'd greatly offer a drink ;) 
well not all at the same time uh ?

anyway, just a small question to end :

where is it mentionned that when you define a boundary, 
the http header 
Content-type: multipart/form-data; boundary=-boundary
needs two -- less than the boundaries mentioned in the data after ?

that's something i haven't found anywhere on the net ?

Thanks !

Best regards,

Guillaume MAISON
-
Guillaume MAISON - [EMAIL PROTECTED]
83, Cours Victor Hugo
47000 AGEN
Tél : 05 53 87 91 48 - Fax : 05 53 68 73 50
e-mail : [EMAIL PROTECTED] - Web : http://nauteus.com

-- 
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] Help: How do I Use the asyn. methods in a D2005 service app

2005-06-23 Thread Wilfried Mestdagh
Hello Dave,

From the top of my head, in the TService's Execute method:
  while not Terminated do
ServiceThread.ProcessRequests(True);

There is also 1 or 2 NT service examples coming with ICS. Also you can
use a normal GUI also as service. I have a little class for it you can
download from my site. Advantage is that the same exe can run as GUI and
as service, so easy for maintenance and debugging.

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

Thursday, June 23, 2005, 13:59, Dave wrote:

> I'm trying to create a service app which checks the status of 80 remote
> printers by accessing their web pages using the ICS HTTP Client
> asynchronously.  I initially put the code in a GUI app to test it, then
> tried to move it to a service and discovered that there is no
> Application.ProcessMessages method so I don't seem to be able to make the
> main procedure loop until the event is triggered.

> In the main execute function I just want to wait until each of the requests
> responds & triggers the OnRequestDone event.  How can I do this in a service
> app?

> The only alternatives I can see are either make the app threaded & to put
> each of the requests into a separate thread & use the synchronous calls, or
> process them sequentially synchronously in the main execute function.

> Any ideas?




--
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] Help: How do I Use the asyn. methods in a D2005 service app

2005-06-23 Thread Angus Robertson - Magenta Systems Ltd
> In the main execute function I just want to wait until each of the 
> requests responds & triggers the OnRequestDone event.  How can I do
> this in a service app?

The service excecute method needs a message loop added, which replaces 
the Application.Run method that drives an interactive application. 

procedure TComCapServ.ServiceExecute(Sender: TService);
begin
while not Terminated do
begin
ServiceThread.ProcessRequests (true);   // wait for message?
end;
end;

This is not ICS specific, it's used with any service that uses messages.

Angus

-- 
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] Help: How do I Use the asyn. methods in a D2005 serviceapp

2005-06-23 Thread Arno Garrels
Dave wrote:
> I'm trying to create a service app which checks the status of 80 remote
> printers by accessing their web pages using the ICS HTTP Client
> asynchronously.  I initially put the code in a GUI app to test it, then
> tried to move it to a service and discovered that there is no
> Application.ProcessMessages method so I don't seem to be able to make the
> main procedure loop until the event is triggered.

Why Application.ProcessMessages? You don't need it.

> 
> In the main execute function I just want to wait until each of the
> requests responds & triggers the OnRequestDone event.  How can I do this
> in a service app?

Waiting is not a good idea, the service has to be responsive to control
messages and ICS requires that messages are processed as well, think
event-driven. SvcTcp demo is a good service howto.

> 
> The only alternatives I can see are either make the app threaded & to put
> each of the requests into a separate thread & use the synchronous calls,
> or process them sequentially synchronously in the main execute function.

Avoid additional worker threads unless you realy need them, it would
complicate things unnecessarily. 


Arno Garrels

> 
> Any ideas?

--
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] Help authoring tool: Time2help

2005-06-11 Thread Colin Meeks
Hi Francois

I don't know anything about Time2Help, but I think Help Scribble from
http://www.jgsoft.com may help.I've used it to document several
components and it's pretty easy stuff.

Colin 

On 6/11/05, Francois PIETTE <[EMAIL PROTECTED]> wrote:
> Long time ago, I used Time2help V2 to build help files for ICS and MidWare.
> I even got an official license for free from the editor to build ICS &
> MidWare help files.
> Now I would like to update those help files, but I have lost my Time2Help
> utility.
> I've searched on the web (www.time2help.com) but it looks like this product
> is dead. Only V1 is still available but that version is unable to open V2
> projects !
> 
> Does anyone know where I can get Time2help V2 ? Maybe someone still have the
> product on his hard drive.
> Alternatively, what product can replace Time2help (that is scan Delphi
> source code and extract help from comments) ?
> Please answer privately because subject is not really on topic in the
> mailing list.
> 
> --
> [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
> 


-- 

Colin Meeks
http://www.col-boy.com

10 Gmail Accounts to give away. Apply within.

--
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] [HELP] FTP Server possible bug ?

2005-05-23 Thread Guillaume MAISON
Sorry for previous mail,
it wasn't mean to be sent at this time :(

i was checking something...


Guillaume MAISON
-
Guillaume MAISON - [EMAIL PROTECTED]
83, Cours Victor Hugo
47000 AGEN
Tél : 05 53 87 91 48 - Fax : 05 53 68 73 50
e-mail : [EMAIL PROTECTED] - Web : http://nauteus.com


--
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] [HELP] FTP Server possible bug ?

2005-05-23 Thread Guillaume MAISON
> the only thing i haven't tested yet is re writing a sample as a service...
>
> i'll do it on monday...
>

Well well well...

i've rewritten the service from the sample app, as it seemed to work nicely...
Results are :
- With a client written for test (that just do Connect/GET/Disconnect) it works 
perfectly.
- With my real client application, it doesn't...

i thought that it would come from SQLite, that i'm using, but definitely not...

last, i've been looking at the client side...

and i reminded of somethign François has written in another recent mail :

"Usually, when you receive the same data twice, it is because you called the
message pump from one the ICS component event handler. Never call directly
or indirectly ( ShowMessage, MessageBox,...) from an event handler that is
called by hardware (a data packet comes from the network) unless you really
know what you are doing."

My question is the following :
i'm receiving a file containing ids. i'm analyzing the file as it is received
(after the request done with rqType = ftpGetAsync) and, to prevent the user
from thinking the application is frozen, i open some kind of "Wait until 
finished" window.
as i go through the file received, i set



Guillaume MAISON
-
Guillaume MAISON - [EMAIL PROTECTED]
83, Cours Victor Hugo
47000 AGEN
Tél : 05 53 87 91 48 - Fax : 05 53 68 73 50
e-mail : [EMAIL PROTECTED] - Web : http://nauteus.com


--
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] [HELP] FTP Server possible bug ?

2005-05-21 Thread Guillaume MAISON
> May be, but try again to make a small demo application that shows the problem
> and I'm sure someone will/can help you.

i've tried to redo a sample even using the SQL stuff...
everything runs fine...

the only thing i haven't tested yet is re writing a sample as a service...

i'll do it on monday...

thanks a lot for your help...

for now, there won't be any thread and... well if several asks at the same time,
there'll be some waiting on some parts...

Guillaume MAISON
-
Guillaume MAISON - [EMAIL PROTECTED]
83, Cours Victor Hugo
47000 AGEN
Tél : 05 53 87 91 48 - Fax : 05 53 68 73 50
e-mail : [EMAIL PROTECTED] - Web : http://nauteus.com


--
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] [HELP] FTP Server possible bug ?

2005-05-21 Thread Arno Garrels
Guillaume MAISON wrote:
>>> in my application, i still have that damn RetrDataSent triggered before
>>> RetrSessionConnected...
>> 
>> Have you tried to assign the DataStream in FtpServer1GetProcessing?
>> DelayedSend := TRUE;
>> MyClient.FWorkerThread.Client.DataStream := TMemoryStream.Create;
>> MyClient.FWorkerThread.Resume;
>> Sleep(0);
> 
> alas yes !
> 
> i've done it liek this :
> MyClient.datastream:=TMemoryStream.Create;
> 
> but, i'm not pretty sure it may have to do w/ the RetrDataSent event...

May be, but try again to make a small demo application that shows the problem
and I'm sure someone will/can help you.

Arno Garrels

--
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] [HELP] FTP Server possible bug ?

2005-05-21 Thread Guillaume MAISON
> > in my application, i still have that damn RetrDataSent triggered before
> > RetrSessionConnected...
>
> Have you tried to assign the DataStream in FtpServer1GetProcessing?
> DelayedSend := TRUE;
> MyClient.FWorkerThread.Client.DataStream := TMemoryStream.Create;
> MyClient.FWorkerThread.Resume;
> Sleep(0);

alas yes !

i've done it liek this :
MyClient.datastream:=TMemoryStream.Create;

but, i'm not pretty sure it may have to do w/ the RetrDataSent event...

as i can see, it's like if the client data socket receives a WM_ASYNSELECT
with the FD_WRITE and that it still has the OnDataSent event set to 
ClientRetrDataSent.

below is the procedure that sets this event.

procedure TFtpServer.ClientPassiveSessionAvailable(Sender : TObject; AError  : 
Word);
var
HSocket : TSocket;
Client  : TFtpCtrlSocket;
Data: TWSocket;
begin
[...]
end
else if Client.CurCmdType in [ftpcRETR, ftpcLIST, ftpcNLST, ftpcMLSD] then 
begin  { angus V1.41 }
Client.DataSocket.OnSessionConnected  := ClientRetrSessionConnected;
Client.DataSocket.OnSessionClosed := ClientRetrSessionClosed;
Client.DataSocket.OnDataAvailable := nil;
Client.DataSocket.OnDataSent  := ClientRetrDataSent;
[...]
 it seems to be a combination of that settings plus a message above that 
triggers the OnRetrDataSent...

can't see WHY ! i'm not that familiar with ics design to be able to play around 
with such messages...
all i know is that i've been using the same code that the demo, included it 
within a service
(with no visual forms or anything like that), that i'm using some SQL stuff 
(Zeos) to access a MySQL DB...
and that's all... i don't think that Zeos can be involved, because a message is 
always sent to a specific handle,
a known one...

but the riddle is that doing the same application (the sample) doesn't have the 
same effect...

i'm really puzzled

Guillaume MAISON
-
Guillaume MAISON - [EMAIL PROTECTED]
83, Cours Victor Hugo
47000 AGEN
Tél : 05 53 87 91 48 - Fax : 05 53 68 73 50
e-mail : [EMAIL PROTECTED] - Web : http://nauteus.com


--
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] [HELP] FTP Server possible bug ?

2005-05-21 Thread Arno Garrels
Guillaume MAISON wrote:
>> The DataStream is nil at that time, try this:
>> 
>> procedure TGetProcessingThread.Execute;
>> var
>>  aBuf : String;
>>  i : integer;
>> begin
>> abuf := 'One ring to rule them all !'#13#10;
>> Client.DataStream := TMemoryStream.Create;
>> for i := 0 to 1000 do
>> Client.DataStream.Write(PChar(aBuf)^, Length(aBuf));
>> Client.DataStream.Seek(0, 0);
>> end;
>> 
>> Arno Garrels
> 
> yes i've seen it... and this demo works perfectly as expected.
> 
> in my application, i still have that damn RetrDataSent triggered before
> RetrSessionConnected...

Have you tried to assign the DataStream in FtpServer1GetProcessing?
DelayedSend := TRUE;
MyClient.FWorkerThread.Client.DataStream := TMemoryStream.Create;
MyClient.FWorkerThread.Resume;
Sleep(0);

Arno Garrels

--
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] [HELP] FTP Server possible bug ?

2005-05-21 Thread Guillaume MAISON
> The DataStream is nil at that time, try this:
>
> procedure TGetProcessingThread.Execute;
> var
>  aBuf : String;
>  i : integer;
> begin
> abuf := 'One ring to rule them all !'#13#10;
> Client.DataStream := TMemoryStream.Create;
> for i := 0 to 1000 do
> Client.DataStream.Write(PChar(aBuf)^, Length(aBuf));
> Client.DataStream.Seek(0, 0);
> end;
>
> Arno Garrels

yes i've seen it... and this demo works perfectly as expected.

in my application, i still have that damn RetrDataSent triggered before 
RetrSessionConnected...
and as there's a RetrSessionDisconnected event triggered, my client received 
the requestdone event
with ftpGetAsync as the request type.
that's where my problems come from...

the thing i don't understand is why that damn RetrDataSent are triggered ?!

as far as i can see, through debugging, it's when sending the '105 Opening Data 
connection' that it posts
a message including FD_WRITE. and when my client socket receive this message, 
it triggers ClientRetrDataSent
which triggers itself the SendNextDataChunk, etc...

this is how i see it.. how i've debugged it... but i may be wrong ! but then, 
where the problem comes from
as the sample provided above works perfectly as expected ?! i won't play to 
send messages for fun...

Guillaume MAISON
-
Guillaume MAISON - [EMAIL PROTECTED]
83, Cours Victor Hugo
47000 AGEN
Tél : 05 53 87 91 48 - Fax : 05 53 68 73 50
e-mail : [EMAIL PROTECTED] - Web : http://nauteus.com


--
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] [HELP] FTP Server possible bug ?

2005-05-21 Thread Arno Garrels
Guillaume MAISON wrote:

The DataStream is nil at that time, try this:

procedure TGetProcessingThread.Execute;
var
 aBuf : String;
 i : integer;
begin
abuf := 'One ring to rule them all !'#13#10;
Client.DataStream := TMemoryStream.Create;
for i := 0 to 1000 do
Client.DataStream.Write(PChar(aBuf)^, Length(aBuf));
Client.DataStream.Seek(0, 0);
end;

Arno Garrels

>> It's just a guess, sounds like your multithreading isn't designed well.
>> Can you explain your thread design in your own words?
>> Arno Garrels
> 
> well, in that case, the demo for the ftp server has a bad multithreading
> design. 
> 
> i'm just using the very same design, and the very same classname ;)
> 
> for a detail :
> i have an object that has the OnGetProcessing procedure which is linked
> to the 
> FtpServer's OnGetProcessing.
> within this procedure i'm using a Client Class which is *exactly* like
> TMyClient (also declared as FtpServer.ClientClass before the server
> starts). 
> i'm creating the thread object exactly the same way as in the demo.
> 
> the same object that holds the OnGetProcessing procedure holds the
> WorkerThreadTerminated procedure 
> linked to the Thread's OnTerminate event.
> This WorkerThreadTerminated procedure has exactly the same code as in the
> demo. 
> 
> In fact i've almost changed anything as it fitted exactly my needs.
> I've only written in the Thread's Execute method the code i needed to
> fill the client Datastream... 
> 
> i would suggest you to download the sample i've provided here
> http://nauteus.com/FTPSample.zip. 
> The code in this sample is precisely what doesn't seem to work...
> 
> to use that FTP Server :
> 1. create the EXE file and run it
> 2. within the EXE directory, create an empty file named 'images'
> 3. open your favorite ftp client
> 4. try to download this file.
> 
> it should be, on your ftp client side, a text file... but for me (using
> filezilla) it's empty... 
> 
> Thanks for your help,
> 
> Guillaume MAISON
> -
> Guillaume MAISON - [EMAIL PROTECTED]
> 83, Cours Victor Hugo
> 47000 AGEN
> Tél : 05 53 87 91 48 - Fax : 05 53 68 73 50
> e-mail : [EMAIL PROTECTED] - Web : http://nauteus.com

--
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] [HELP] FTP Server possible bug ?

2005-05-21 Thread Guillaume MAISON
> i would suggest you to download the sample i've provided here 
> http://nauteus.com/FTPSample.zip.
> The code in this sample is precisely what doesn't seem to work...

forget about that sample... it'll work...

but the main thing is that in my main server app, when in RETR mode :
10  [2005/05/21 10:59:41.781] FTP ClientID=1 Client command : KeyWord=RETR 
- Params=IMAGES - Answer=
11  [2005/05/21 10:59:41.875] FTP ClientID=1 BuildFilePath : 
Directory=C:\TEMP\ - FileName=IMAGES - NewFileName=
12  [2005/05/21 10:59:41.921] FTP ClientID=1 ValidateGet : 
FilePath=C:\TEMP\IMAGES - Client.fileName=IMAGES
13  [2005/05/21 10:59:41.984] FTP ClientID=1 : BeginOfThread Thread 
($09AC)Creation File [IMAGES]
14  [2005/05/21 10:59:42.046] FTP ClientID=1 Answer : 150 Opening data 
connection for IMAGES.
15  [2005/05/21 10:59:42.125] FTP ClientID=1 TID-$09AC : FTP : InThread 
File to process : IMAGES
16  [2005/05/21 10:59:42.187] FTP ClientID=1 Retr Datasent
17  [2005/05/21 10:59:42.250] FTP ClientID=1 Retr Datasent
18  [2005/05/21 10:59:42.328] FTP ClientID=1 Answer : 226 File sent ok
19  [2005/05/21 10:59:42.390] FTP ClientID=1 RetrSessionClosed
[...]
30  [2005/05/21 11:00:34.546] FTP ClientID=1 TID-$09AC : FTP : InThread 
File (IMAGES) process over!
31  [2005/05/21 11:00:34.640] FTP ClientID=1 TID-$09AC : FTP : InThread 
Rewind Client.datastream !
32  [2005/05/21 11:00:34.718] FTP ClientID=1 : EndOfThread ($09AC) File 
[IMAGES (size :8)]
33  [2005/05/21 11:00:34.781] FTP ClientID=1 RetrSessionConnected
34  [2005/05/21 11:00:34.875] FTP ClientID=1 Answer : 226 File sent ok
35  [2005/05/21 11:00:34.953] FTP ClientID=1 RetrSessionClosed

the lines 14 and 15 are good...
lines 16 and 17 seems to correspond to something that has not been asked for...

that's here that there's a trick, in my application... because it says that a 
RETR has been answered.
although nothing has been answered at all !
lines 18 and 19 are here to say that ! but i have no RetrSessionConnected 
triggered
but as the thread has finished, then i have what should be (lines 32 to 35) ; 
except that there's no
RetrDataSent event because the Client is Nil...

i don't know why i have that ! i've figured it out in a previous mail where i 
think i have found
one of the reason (wihtin the TFtpServer.ClientRetrDataSent procedure and to be 
more precise in
the TFtpServer.SendNextDataChunk procedure).
i don't know why, but in my application, something goes wrong and i can't see 
why it goes wrong as the used
code looks exactly like the one in the sample above...

still going deeper...

sorry to bother you with that guys...

i'll try to talk a bit less ;)

Guillaume MAISON
-
Guillaume MAISON - [EMAIL PROTECTED]
83, Cours Victor Hugo
47000 AGEN
Tél : 05 53 87 91 48 - Fax : 05 53 68 73 50
e-mail : [EMAIL PROTECTED] - Web : http://nauteus.com


--
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] [HELP] FTP Server possible bug ?

2005-05-21 Thread Guillaume MAISON
> It's just a guess, sounds like your multithreading isn't designed well.
> Can you explain your thread design in your own words?
> Arno Garrels

well, in that case, the demo for the ftp server has a bad multithreading design.

i'm just using the very same design, and the very same classname ;)

for a detail :
i have an object that has the OnGetProcessing procedure which is linked to the
FtpServer's OnGetProcessing.
within this procedure i'm using a Client Class which is *exactly* like
TMyClient (also declared as FtpServer.ClientClass before the server starts).
i'm creating the thread object exactly the same way as in the demo.

the same object that holds the OnGetProcessing procedure holds the 
WorkerThreadTerminated procedure
linked to the Thread's OnTerminate event.
This WorkerThreadTerminated procedure has exactly the same code as in the demo.

In fact i've almost changed anything as it fitted exactly my needs.
I've only written in the Thread's Execute method the code i needed to fill the 
client Datastream...

i would suggest you to download the sample i've provided here 
http://nauteus.com/FTPSample.zip.
The code in this sample is precisely what doesn't seem to work...

to use that FTP Server :
1. create the EXE file and run it
2. within the EXE directory, create an empty file named 'images'
3. open your favorite ftp client
4. try to download this file.

it should be, on your ftp client side, a text file... but for me (using 
filezilla) it's empty...

Thanks for your help,

Guillaume MAISON
-
Guillaume MAISON - [EMAIL PROTECTED]
83, Cours Victor Hugo
47000 AGEN
Tél : 05 53 87 91 48 - Fax : 05 53 68 73 50
e-mail : [EMAIL PROTECTED] - Web : http://nauteus.com


--
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] [HELP] FTP Server possible bug ?

2005-05-20 Thread Arno Garrels
It's just a guess, sounds like your multithreading isn't designed well.
Can you explain your thread design in your own words? 
Arno Garrels


Guillaume MAISON wrote:
> Le 20 May 2005 à 16:31, Guillaume MAISON a écrit:
> 
>> Unless there's something obvious, i don't know why the ftpserver opens
>> data for connection though i've set DelayedSend:=True in the
>> OnGetProcessing event ? 
> After more and more debugging, i've found something :
> when saying delayedSend to true, the data is, effectively, not sent.
> But, the ftpserver keeps going on telling back to the client '150 opening
> data, etc...'. 
> 
> the thing is that doing so, it fires the function
> TCustomWSocket.Send(Data : Pointer; Len : Integer) : integer; 
> Which, in turns, post a message :
> if bAllSent then begin
> { We post a message to fire the FD_WRITE message wich in turn
> will } 
> { fire the OnDataSent event. We cannot fire the event ourself
> } 
> { because the event handler will eventually call send again. 
> } 
> { Sending the message prevent recursive call and stack overflow. 
> } 
> { The PostMessage function posts (places) a message in a window's
> } 
> { message queue and then returns without waiting for the 
> } 
> { corresponding window to process the message. The message will
> be } 
> { seen and routed by Delphi a litle later, when we will be out of
> } 
> { the send function. 
> } 
> PostMessage(Handle,
> WM_ASYNCSELECT,
> FHSocket,
> MakeLong(FD_WRITE, 0));
> end;
> 
> This message is then received by the procedure
> TCustomWSocket.Do_FD_WRITE(var msg: TMessage); 
> the thing is that, i have at the same time my thread which is kindly
> retrieving data, but has nothing to send yet... 
> this Do_FD_WRITE procedure triggers the procedure
> TFtpServer.ClientRetrDataSent(Sender : TObject; AError : Word); 
> var
> Client : TFtpCtrlSocket;
> Data   : TWSocket;
> begin
> Data   := TWSocket(Sender);
> Client := TFtpCtrlSocket(Data.Owner);
> 
> if Client.AbortingTransfer then
> Exit;
> 
> try
> { Trigger the user event for the received data }
> ==>TriggerRetrDataSent(Client, Data, AError);
> 
> here is the problem... When this procedure (TriggerRetrDataSent) is
> executed, it sends back to the client the fact that 
> the file has been sent. But the Client.Datastream is empty, so my client
> application has retrieved a file, but empty. 
> But as i think that i have received a file, i go on my process
> (disconnecting ==> which means on server side 
> that the client is destroyed and i have exceptions within my thread) and
> analyzing the received (empty) content. 
> 
> Is this normal behavior or ?
> 
> Guillaume MAISON
> -
> Guillaume MAISON - [EMAIL PROTECTED]
> 83, Cours Victor Hugo
> 47000 AGEN
> Tél : 05 53 87 91 48 - Fax : 05 53 68 73 50
> e-mail : [EMAIL PROTECTED] - Web : http://nauteus.com

--
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] [HELP] FTP Server possible bug ?

2005-05-20 Thread Francois PIETTE
> Is this normal behavior or ?

I can't tell you. And this would need too much analysis to give a good
answer. Unfortunately I have not time (I'm busy with ICS-SSL). Sorry.

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


- Original Message - 
From: "Guillaume MAISON" <[EMAIL PROTECTED]>
To: "ICS support mailing" 
Sent: Friday, May 20, 2005 5:39 PM
Subject: [twsocket] [HELP] FTP Server possible bug ?


> Le 20 May 2005 à 16:31, Guillaume MAISON a écrit:
>
> > Unless there's something obvious, i don't know why the ftpserver opens
data for connection
> > though i've set DelayedSend:=True in the OnGetProcessing event ?
> After more and more debugging, i've found something :
> when saying delayedSend to true, the data is, effectively, not sent.
> But, the ftpserver keeps going on telling back to the client '150 opening
data, etc...'.
>
> the thing is that doing so, it fires the function TCustomWSocket.Send(Data
: Pointer; Len : Integer) : integer;
> Which, in turns, post a message :
> if bAllSent then begin
> { We post a message to fire the FD_WRITE message wich in turn
will }
> { fire the OnDataSent event. We cannot fire the event
lf  }
> { because the event handler will eventually call send
   }
> { Sending the message prevent recursive call and stack
erflow.   }
> { The PostMessage function posts (places) a message in a
indow's  }
> { message queue and then returns without waiting for
}
> { corresponding window to process the message. The message will
be }
> { seen and routed by Delphi a litle later, when we will be out
f  }
> { the send
  }
> PostMessage(Handle,
> WM_ASYNCSELECT,
> FHSocket,
> MakeLong(FD_WRITE, 0));
> end;
>
> This message is then received by the procedure
TCustomWSocket.Do_FD_WRITE(var msg: TMessage);
> the thing is that, i have at the same time my thread which is kindly
retrieving data, but has nothing to send yet...
> this Do_FD_WRITE procedure triggers the procedure
TFtpServer.ClientRetrDataSent(Sender : TObject; AError : Word);
> var
> Client : TFtpCtrlSocket;
> Data   : TWSocket;
> begin
> Data   := TWSocket(Sender);
> Client := TFtpCtrlSocket(Data.Owner);
>
> if Client.AbortingTransfer then
> Exit;
>
> try
> { Trigger the user event for the received data }
> ==>TriggerRetrDataSent(Client, Data, AError);
>
> here is the problem... When this procedure (TriggerRetrDataSent) is
executed, it sends back to the client the fact that
> the file has been sent. But the Client.Datastream is empty, so my client
application has retrieved a file, but empty.
> But as i think that i have received a file, i go on my process
(disconnecting ==> which means on server side
> that the client is destroyed and i have exceptions within my thread) and
analyzing the received (empty) content.
>
> Is this normal behavior or ?
>
> Guillaume MAISON
> -
> Guillaume MAISON - [EMAIL PROTECTED]
> 83, Cours Victor Hugo
> 47000 AGEN
> Tél : 05 53 87 91 48 - Fax : 05 53 68 73 50
> e-mail : [EMAIL PROTECTED] - Web : http://nauteus.com
>
>
> -- 
> 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] [HELP] FTP server random client deconnection

2005-05-20 Thread Guillaume MAISON
> > hi everyone,
> >
> > still working on my ftp service server.
>
> [...snip...]
>
> > The exceptions are triggered because the Client used within the thread is 
> > nil.
> > what i don't understand is why, although i set delayedsend to true,
> > the ftp server begins to open the data connection and says the file is sent 
> > ?
> >
> > any clue ?
>
> besides, i've noticed that it happens only when the server (as a service) has 
> some "visual form".
> i've used your "special unit", Wilfried... it works very well except that it 
> seems that when
> you build an visual application, and transform it as a service (with or 
> without wilfried's unit)
> keeping the visual part, there're some weird stuff with messages, message 
> pump, etc...

> The other part of the thing is that if the service is made as a non-visual 
> application (no log window or anything else)
> it seems to work perfectly.
>
> François, i think you got the point (using an http server as a small client 
> application).

Well in fact, after several hours of testing, there's really a problem :
1   [2005/05/20 16:20:33.250] FTP ClientID=1 : Connection de 192.168.0.49
2   [2005/05/20 16:20:33.390] FTP ClientID=1 Answer : 331 Password required 
for 1.
3   [2005/05/20 16:20:33.546] FTP ClientID=1 : Authentification réussie
4   [2005/05/20 16:20:33.671] FTP ClientID=1 Answer : 230 User 1 logged in.
5   [2005/05/20 16:20:33.812] FTP ClientID=1 Answer : 227 Entering Passive 
Mode (192,168,0,49,144,136).
6   [2005/05/20 16:20:33.890] FTP ClientID=1 : BeginOfThread Thread 
Creation File [IMAGES]
7   [2005/05/20 16:20:34.031] FTP ClientID=1 Answer : 150 Opening data 
connection for IMAGES.
8   [2005/05/20 16:20:34.203] FTP ClientID=1 TID-$05A4 : FTP : InThread 
File to process : IMAGES
9   [2005/05/20 16:20:34.281] FTP ClientID=1 Answer : 226 File sent ok
10  [2005/05/20 16:20:34.437] FTP ClientID=1 Answer : 221 Goodbye.
11  [2005/05/20 16:20:34.546] FTP ClientID=2 : Connection de 192.168.0.49
12  [2005/05/20 16:20:34.640] FTP ClientID=1 : Déconnection de 192.168.0.49
13  [2005/05/20 16:20:34.734] FTP ClientID=2 Answer : 331 Password required 
for 1.
14  [2005/05/20 16:20:34.921] FTP ClientID=2 : Authentification réussie
15  [2005/05/20 16:20:35.015] FTP ClientID=2 Answer : 230 User 1 logged in.
16  [2005/05/20 16:20:35.109] FTP ClientID=2 Answer : 227 Entering Passive 
Mode (192,168,0,49,144,136).
17  [2005/05/20 16:20:35.187] FTP ClientID=2 : BeginOfThread Thread 
Creation File [IMAGES]
18  [2005/05/20 16:20:35.281] FTP ClientID=2 Answer : 150 Opening data 
connection for IMAGES.
19  [2005/05/20 16:20:35.375] FTP ClientID=2 TID-$0AFC : FTP : InThread 
File to process : IMAGES
20  [2005/05/20 16:20:35.484] FTP ClientID=2 Answer : 226 File sent ok
21  [2005/05/20 16:20:35.609] FTP ClientID=2 Answer : 221 Goodbye.
22  [2005/05/20 16:20:35.750] FTP ClientID=3 : Connection de 192.168.0.49
23  [2005/05/20 16:20:35.906] FTP ClientID=2 : Déconnection de 192.168.0.49

And here's the code i'm using :
ThreadCreation (within OnGetProcessing) :
Begin
[..]
//DisplayMsg is using SQLite to store logs

  Displaymsg('FTP ClientID='+IntToStr(Client.ID)+' : BeginOfThread 
Thread Creation File ['+Client.FileName+']');
  MyServer := Sender as TFtpServer;
  MyClient := Client as TVigiwareClient;
  MyClient.FWorkerThread := TGetProcessingThread.Create(TRUE);
  MyClient.FWorkerThread.Server  := MyServer;
  MyClient.FWorkerThread.Client  := MyClient;
  MyClient.FWorkerThread.Fdisplay:= DisplayMsg;
  MyClient.FWorkerThread.FHandle := 0;
  MyClient.FWorkerThread.FreeOnTerminate := TRUE;
  MyClient.FWorkerThread.OnTerminate := WorkerThreadTerminated;
  MyClient.FWorkerThread.Resume;
  DelayedSend := TRUE;
[..]
End;

TGetProcessingThread.Execute :
// all variables are ThreadSafe
// Even SendMessage is a thread safe function (uses DisplayMsg which uses 
CriticalSections) :
Begin
[...]
 try
try
   try
  if Assigned(Client.DataStream) then
 Client.DataStream.Destroy;
  Client.DataStream := TMemoryStream.Create;
  SQLImage:=TSQLImageList.Create(Nil);
  SendMessage('FTP : InThread File to process : 
'+uppercase(Client.FileName));
   Except
 on e : exception do
raise exception.Create('FileToProc Except : '+e.Message);
   End;
   try
  new(lp);
  lp^.SelectionType:=uImageInfo.istImageIdf;
  lp^.IdRecord:=PFTPSQLProvider(Client.UserData)^.idRecord;
  lp^.ExcludeImage:=True;
  lp^.ImageFrom:=-1;//StrToInt(Client.FileName);
  lp^.ImageTo:=-1; //StrToInt(Client.FileName);
  SQLImage.SetParame

Re: [twsocket] [HELP] FTP server random client deconnection

2005-05-19 Thread Guillaume MAISON
> hi everyone,
>
> still working on my ftp service server.

[...snip...]

> The exceptions are triggered because the Client used within the thread is nil.
> what i don't understand is why, although i set delayedsend to true,
> the ftp server begins to open the data connection and says the file is sent ?
>
> any clue ?

besides, i've noticed that it happens only when the server (as a service) has 
some "visual form".
i've used your "special unit", Wilfried... it works very well except that it 
seems that when
you build an visual application, and transform it as a service (with or without 
wilfried's unit)
keeping the visual part, there're some weird stuff with messages, message pump, 
etc...

i'm not using particuliar stuff within that service, except for some DB comps 
and self made visual comp
to enhance a bit the visual part.

that's all.

i really don't know why there can be such things. i've been through debugging 
for several hours,
looking at françois' code - which seems working well. But i don't see 
anything...

The other part of the thing is that if the service is made as a non-visual 
application (no log window or anything else)
it seems to work perfectly.

François, i think you got the point (using an http server as a small client 
application).

but that's a bit annoying...

Guillaume MAISON
-
Guillaume MAISON - [EMAIL PROTECTED]
83, Cours Victor Hugo
47000 AGEN
Tél : 05 53 87 91 48 - Fax : 05 53 68 73 50
e-mail : [EMAIL PROTECTED] - Web : http://nauteus.com


--
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] [HELP]FTPServer within a service...

2005-05-18 Thread Francois PIETTE
> i'm wondering about the way to implement a FTP server
> (with thread on GetProcessing) within a Windows Service ?
> Does anyone has a sample ?

The is a sample service in the demos.
There is nothing very special to make a service using ICS. As long as there
is a working message pump, ICS component will work.

For the GUI, you use another application, a GUI application that communicate
with the service using ICS, probably using the HTTP server component which
offer the eaisiest way to build an administrative interface without writing
another application: you just use a browser to do the administration.

--
Contribute to the SSL Effort. Visit http://www.overbyte.be/eng/ssl.html
--
[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


Re: [twsocket] [HELP]FTPServer within a service...

2005-05-18 Thread Francois PIETTE
Use a thread with his own message within your service to put all ICS stuff
and you'll get rid of anything else.
--
[EMAIL PROTECTED]
http://www.overbyte.be

- Original Message - 
From: "Guillaume MAISON" <[EMAIL PROTECTED]>
To: "ICS support mailing" 
Sent: Wednesday, May 18, 2005 5:42 PM
Subject: Re: [twsocket] [HELP]FTPServer within a service...


> > > i'm wondering about the way to implement a FTP server (with thread on
> > > GetProcessing) within a Windows Service ?
> >
> > Any windows GUI application can be run as a service, provided it never
> > asks for any input from the user.  I use a very simple real service
> > that runs the windows program, and sends it a message telling it to
> > exit when the service is stopped.  If the message is lost, it
> > terminates the program.
> >
> > This makes debugging very easy, since you can have as many, buttons,
> > labels and memos in the application as you like.
>
> Yes but i have noticed that if you use :
> - a service module
> - a Ftp server comp within the Service Datamodule
> - a window created at runtime and shown (to display log messages)
>
> there're some problems with the message pump process between the
FtpServer's one
> and the Application's one(coming from Forms.pas).
> Particularly when you use a Thread within the GetProcessing event and that
you delay the
> DoSendData...
>
> In this later case, the message to the server socket (to send data :
WM_FTPSRV_START_SEND) is sent but
> never received, unless you can trigger the log window's message pump wich
then transmit it to the socket.
> But if meanwhile the client has disconnected, then there's an exception...
>
> i don't know if i'm clear enough :| !
>
> Guillaume MAISON
> -
> Guillaume MAISON - [EMAIL PROTECTED]
> 83, Cours Victor Hugo
> 47000 AGEN
> Tél : 05 53 87 91 48 - Fax : 05 53 68 73 50
> e-mail : [EMAIL PROTECTED] - Web : http://nauteus.com
>
>
> -- 
> 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] [HELP]FTPServer within a service...

2005-05-18 Thread Guillaume MAISON
> Hello Guillaume,
>
> On my site you find a simple class to include in your GUI program so
> that the same EXE can run as normal GUI and also as NT service without
> any change.
>
> Advantage is that the service can make a tray icon when user log in, and
> if you click on it the service can popup his main form. Very easy for
> config and so :)

i've downloaded it... and seen it...
Well... i'll try it for one of my services (i have several)...
i'll let you know ;)

i'll see especially on the problem i've mentioned about message pump...

Thanks a lot !

Guillaume MAISON
-
Guillaume MAISON - [EMAIL PROTECTED]
83, Cours Victor Hugo
47000 AGEN
Tél : 05 53 87 91 48 - Fax : 05 53 68 73 50
e-mail : [EMAIL PROTECTED] - Web : http://nauteus.com


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


  1   2   >