Re: [twsocket] HTTP...

2008-05-15 Thread zayin

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

Thanks.

 

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

> I have a server and I want to send a jpeg to the client upon request. 
> This image is dynamic. I am using AnswerStream and that is all working
great.
>
> Then I decided I also wanted some text to go before the image.
>
> I could not determine how to send text and an image with the same reply.
>
> So, I imbed a link to the image in a  tag and that is all 
> working now.
>
> The client now has to make two round trips to get the complete page. 
> One for the text and one for the image.
>
> Is this the only method to accomplish this task?

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

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

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

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


Re: [twsocket] HTTP...

2008-05-15 Thread Tobias Rapp
Hi!

DZ-Jay wrote:
> A way to create a multi-part response is to encapsulate 
> it as a MIME 822 message.  Here's some basic information on this:
> 
>   http://www.motobit.com/tips/detpg_multiple-files-one-request/

I stumbled over the following lines on that page:

| The situation is even worse if you need authentication for each image
| preview - you must do tenth of authentication requests against user
| database, separated for each http request.

Is that really true? I thought that in the meanwhile it is common 
behavior to establish and keep one TCP connection for all HTTP requests 
until the page is loaded. And that the authentication is remembered for 
a established TCP connection.

/Tobias

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


Re: [twsocket] HTTP...

2008-05-15 Thread Francois PIETTE
> I have a server and I want to send a jpeg to the client upon request. This
> image is dynamic. I am using AnswerStream and that is all working great.
>
> Then I decided I also wanted some text to go before the image.
>
> I could not determine how to send text and an image with the same reply.
>
> So, I imbed a link to the image in a  tag and that is all 
> working
> now.
>
> The client now has to make two round trips to get the complete page. One 
> for
> the text and one for the image.
>
> Is this the only method to accomplish this task?

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

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

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


Re: [twsocket] HTTP...

2008-05-15 Thread zayin

Thanks. I will look into it.

 

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

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

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

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

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

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


Re: [twsocket] HTTP...

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

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

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

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


Re: [twsocket] HTTP...

2008-05-15 Thread DZ-Jay
zayin wrote:
> Hello,
> 
> I have a server and I want to send a jpeg to the client upon request. This
> image is dynamic. I am using AnswerStream and that is all working great.
> 
> Then I decided I also wanted some text to go before the image. 
> 
> I could not determine how to send text and an image with the same reply.
> 
> So, I imbed a link to the image in a  tag and that is all working
> now.
> 
> The client now has to make two round trips to get the complete page. One for
> the text and one for the image.
> 
> Is this the only method to accomplish this task?

What you want to do is send a multi-part MIME payload in the body of 
your HTTP response.  You have to set the content-type to 
"multipart/form-data".  For more information, check this page:

http://www.w3.org/TR/html401/interact/forms.html#h-17.13.4.2

dZ.

-- 
Team ICS

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


[twsocket] HTTP...

2008-05-15 Thread zayin

Hello,

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

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

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

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

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

Is this the only method to accomplish this task?


Thanks,

Mark

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


Re: [twsocket] TWSocket.Send timing

2008-05-15 Thread Angus Robertson - Magenta Systems Ltd
> My debug function to log the timestamps was the culprit. I should 
> have just grabbed the time before, then the time after and done the 
> math. 

Using real time to calculate duration is very inefficient, it's much
better to use GetTickCount which is milliseconds running time since
Windows booted (wraps after 49 days).  The latest ICS V6 beta
OverbyteIcsFtpSrvT.pas unit has a number of timer and trigger related
functions using ticks that handle the 49 day wrap, they are now used in
the FTP client for timing sessions and responses.  

Beware GetTickCount is only accurate to about 15ms depending on OS, so
QueryPerformanceCounter is far more accurate, but with a slightly higher
overhead since it uses 64-bits instead of 32-bits. 

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


Re: [twsocket] TWSocket.Send timing

2008-05-15 Thread Wilfried Mestdagh
> My debug function to log the timestamps was the culprit.

oke then all is fine :)

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

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


Re: [twsocket] TWSocket.Send timing

2008-05-15 Thread info2004
Wilfried,

ErmOops. etc.

My debug function to log the timestamps was the culprit. I should have just 
grabbed the time before, then the time after and done the math. What I actually 
did was review my log file with timestamps in it. This was the cause of the 
delay.

Using the time before and after the call, I am seeing anything between 15 and 
41 
ms for the call to return. Not the 300 previously reported.

The ICS version is 6.04 according to one of the source files.

Regards,

Andy
Wilfried Mestdagh wrote:
> Hello Andy,
> 
>> Dan was correct. The time I noted was for Send to return, not for the data to
>> actually be sent.
> 
> Sorry then I have given you a wrong answer.
> 
>> Given the 300ms for Send to return, is this to be expected?
> 
> No it should return immediatly, the function is async. Are you
> absolutely sure of this? Do you have a recent version of ICS?
> 
> ---
> Rgds, Wilfried [TeamICS]
> http://www.overbyte.be/eng/overbyte/teamics.html
> http://www.mestdagh.biz
> 
> Thursday, May 15, 2008, 09:09, info2004 wrote:
> 
>> Wilfried,
> 
>> Dan was correct. The time I noted was for Send to return, not for the data to
>> actually be sent.
> 
>> Given the 300ms for Send to return, is this to be expected?
> 
>> If it is, then I will look to optimise elsewhere. But it just seems likely 
>> that
>> something is a miss - wrong option setting maybe.
> 
>> Regards,
> 
>> Andy
>> Wilfried Mestdagh wrote:
>>> Hello Dan,
>>>
 As far as I know it shouldn't cause the TWSocket send call to take
 longer since that is asynchronous
>>> Correct, but I think he means the total time to send, not the time of
>>> the function call.
>>>
>>> ---
>>> Rgds, Wilfried [TeamICS]
>>> http://www.overbyte.be/eng/overbyte/teamics.html
>>> http://www.mestdagh.biz
>>>
> 
> 

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


Re: [twsocket] TWSocket.Send timing

2008-05-15 Thread Wilfried Mestdagh
Hello Andy,

> Dan was correct. The time I noted was for Send to return, not for the data to
> actually be sent.

Sorry then I have given you a wrong answer.

> Given the 300ms for Send to return, is this to be expected?

No it should return immediatly, the function is async. Are you
absolutely sure of this? Do you have a recent version of ICS?

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

Thursday, May 15, 2008, 09:09, info2004 wrote:

> Wilfried,

> Dan was correct. The time I noted was for Send to return, not for the data to
> actually be sent.

> Given the 300ms for Send to return, is this to be expected?

> If it is, then I will look to optimise elsewhere. But it just seems likely 
> that
> something is a miss - wrong option setting maybe.

> Regards,

> Andy
> Wilfried Mestdagh wrote:
>> Hello Dan,
>> 
>>> As far as I know it shouldn't cause the TWSocket send call to take
>>> longer since that is asynchronous
>> 
>> Correct, but I think he means the total time to send, not the time of
>> the function call.
>> 
>> ---
>> Rgds, Wilfried [TeamICS]
>> http://www.overbyte.be/eng/overbyte/teamics.html
>> http://www.mestdagh.biz
>> 


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


Re: [twsocket] TWSocket.Send timing

2008-05-15 Thread info2004
Wilfried,

Dan was correct. The time I noted was for Send to return, not for the data to 
actually be sent.

Given the 300ms for Send to return, is this to be expected?

If it is, then I will look to optimise elsewhere. But it just seems likely that 
something is a miss - wrong option setting maybe.

Regards,

Andy
Wilfried Mestdagh wrote:
> Hello Dan,
> 
>> As far as I know it shouldn't cause the TWSocket send call to take
>> longer since that is asynchronous
> 
> Correct, but I think he means the total time to send, not the time of
> the function call.
> 
> ---
> Rgds, Wilfried [TeamICS]
> http://www.overbyte.be/eng/overbyte/teamics.html
> http://www.mestdagh.biz
> 

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