回覆: Re: [twsocket] HTTP POST - SendStream With TMemoryStream

2006-01-19 Thread Opqrst Ghrst
thanks F.P.

I See,
but if the file is more than 1 GB, That will cost my
too mush disk free space,I am confuse on this problem,
because I must add Form Field Value information on the
Head of the data and boundary end of data.it will be
work by ContentTypePost="multipart/form-data" mothod
post. 

--- Francois PIETTE <[EMAIL PROTECTED]> 說:

> > when I use Http Post Web to send file,
> > if the file is bigger as 100mb.
> > because content must has some FormField to post,
> > I use MemorrStream write these information and
> > FileStream.
> > when I load to TMemoryStream it will cause my
> computer
> > slow to build MemoryStream, can I use other
> mothods to
> > resolve this problem?
> 
> If you use TMemoryStream, then your 100MB of data is
> loaded onto RAM which 
> can be slow. Use another kind of TStream, for
> example a TFileStream which 
> store his data in a disk file instead of RAM.
> 
> --
> 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


___
 YM - 離線訊息
 就算你沒有上網,你的朋友仍可以留下訊息給你,當你上網時就能立即看到,任何說話都冇走失。
 http://messenger.yahoo.com.hk
-- 
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: 回覆: Re: [twsocket] HTTP POST - SendStream With TMemoryStream

2006-01-19 Thread Opqrst Ghrst

I see,
but HttpCli.SendStrem must Write "Buf1" String before
Load FileStream, and Wirte "Buf2" String at end.
it seems will change my oringe file imformation.
Because the ContentTypePost="multipart/form-data"
I cannot only read file to Stream.
Do You have nice ideal?
Thanks.


Buf1="-7d5168231620eb2Content-Disposition:
form-data; name="fname+";
filename="+key+"\r\nContent-Type:
application/octet-stream\r\n\r\n";

Buf2=="-7d5168231620eb2--"



--- Paul <[EMAIL PROTECTED]> 說:

> You don't need any buffers to create yourself.
> 
> just use
> HttpCli.SendStrem:= TFileStream.Create('your
> file', fmOpenRead)
> HttpCli.SendStream.Position:= 0;
> HttCli.PostAsync;
> 
> Paul
> 
> 
> - Original Message - 
> From: "Opqrst Ghrst" <[EMAIL PROTECTED]>
> To: "ICS support mailing" 
> Sent: Thursday, January 19, 2006 5:00 PM
> Subject: 回覆: Re: [twsocket] HTTP POST -
> SendStream With TMemoryStream
> 
> 
> > hello
> >
> > I try to use FileStrem, it must has Free Space to
> > create the same size of File,but it should be
> better
> > than TmemoryStream, if teh file is biger.
> >
> > HttpCli->ContentTypePost="multipart/form-data;
> >
>
boundary=---7d5168231620eb2";
> >
>
Buf1="-7d5168231620eb2\r\nContent-Disposition:
> > form-data; name="fname+";
> > filename="+key+"\r\nContent-Type:
> > application/octet-stream\r\n\r\n";
> >
>
Buf2=="-7d5168231620eb2--"
> >
> > SendStream=new TFileStream("temp", fmCreate);
> > SendStream->Size=0;
> > SendStream->WriteBuffer(Buf1.c_str(),
> Buf1.Length());
> >TFileStream* ms=new
> > TFileStream(Filepath.c_str(), fmOpenRead);
> > SendStream->CopyFrom(ms,ms->Size);
> > delete ms;
> > SendStream->WriteBuffer(Buf2.c_str(),
> Buf2.Length());
> > SendStream->Seek(0, soFromBeginning);
> >
> >
> >
> > --- Paul <[EMAIL PROTECTED]> 說:
> >
> >> You should use a TFileStream instead of a
> >> TMemorystream.
> >>
> >> Paul
> >>
> >>
> >>
> >> - Original Message - 
> >> From: "Opqrst Ghrst" <[EMAIL PROTECTED]>
> >> To: "ICS support mailing" 
> >> Sent: Thursday, January 19, 2006 10:37 AM
> >> Subject: [twsocket] HTTP POST - SendStream With
> >> TMemoryStream
> >>
> >>
> >> >
> >> > Hello all,
> >> >
> >> > when I use Http Post Web to send file,
> >> > if the file is bigger as 100mb.
> >> > because content must has some FormField to
> post,
> >> > I use MemorrStream write these information and
> >> > FileStream.
> >> > when I load to TMemoryStream it will cause my
> >> computer
> >> > slow to build MemoryStream, can I use other
> >> mothods to
> >> > resolve this problem?
> >> >
> >> >
> >> > ___
> >> > YM - 離線訊息
> >> >
> >>
> >
>
就算你沒有上網,你的朋友仍可以留下訊息給你,當你上網時就能立即看到,任何說話都冇走失。
> >> > http://messenger.yahoo.com.hk
> >> >
> >>
> >>
> >>
> >
>

> >>
> >>
> >> > -- 
> >> > 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
> >
> >
> > ___
> > YM - 離線訊息
> >
>
就算你沒有上網,你的朋友仍可以留下訊息給你,當你上網時就能立即看到,任何說話都冇走失。
> > http://messenger.yahoo.com.hk
> >
> 
> 
>

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


___
 YM - 離線訊息
 就算你沒有上網,你的朋友仍可以留下訊息給你,當你上網時就能立即看到,任何說話都冇走失。
 http://messenger.yahoo.com.hk
-- 
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] HTTP POST - SendStream With TMemoryStream

2006-01-19 Thread Opqrst Ghrst
hello

I try to use FileStrem, it must has Free Space to
create the same size of File,but it should be better
than TmemoryStream, if teh file is biger.

HttpCli->ContentTypePost="multipart/form-data;
boundary=---7d5168231620eb2";
Buf1="-7d5168231620eb2\r\nContent-Disposition:
form-data; name="fname+";
filename="+key+"\r\nContent-Type:
application/octet-stream\r\n\r\n";
Buf2=="-7d5168231620eb2--"

SendStream=new TFileStream("temp", fmCreate);
SendStream->Size=0;
SendStream->WriteBuffer(Buf1.c_str(), Buf1.Length());
TFileStream* ms=new
TFileStream(Filepath.c_str(), fmOpenRead);
SendStream->CopyFrom(ms,ms->Size);
delete ms;
SendStream->WriteBuffer(Buf2.c_str(), Buf2.Length());
SendStream->Seek(0, soFromBeginning);



--- Paul <[EMAIL PROTECTED]> 說:

> You should use a TFileStream instead of a
> TMemorystream.
> 
> Paul
> 
> 
> 
> - Original Message - 
> From: "Opqrst Ghrst" <[EMAIL PROTECTED]>
> To: "ICS support mailing" 
> Sent: Thursday, January 19, 2006 10:37 AM
> Subject: [twsocket] HTTP POST - SendStream With
> TMemoryStream
> 
> 
> >
> > Hello all,
> >
> > when I use Http Post Web to send file,
> > if the file is bigger as 100mb.
> > because content must has some FormField to post,
> > I use MemorrStream write these information and
> > FileStream.
> > when I load to TMemoryStream it will cause my
> computer
> > slow to build MemoryStream, can I use other
> mothods to
> > resolve this problem?
> >
> >
> > ___
> > YM - 離線訊息
> >
>
就算你沒有上網,你的朋友仍可以留下訊息給你,當你上網時就能立即看到,任何說話都冇走失。
> > http://messenger.yahoo.com.hk
> >
> 
> 
>

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


___
 YM - 離線訊息
 就算你沒有上網,你的朋友仍可以留下訊息給你,當你上網時就能立即看到,任何說話都冇走失。
 http://messenger.yahoo.com.hk
-- 
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

[twsocket] HTTP POST - SendStream With TMemoryStream

2006-01-19 Thread Opqrst Ghrst

Hello all,

when I use Http Post Web to send file,
if the file is bigger as 100mb.
because content must has some FormField to post,
I use MemorrStream write these information and
FileStream.
when I load to TMemoryStream it will cause my computer
slow to build MemoryStream, can I use other mothods to
resolve this problem?


___
 YM - 離線訊息
 就算你沒有上網,你的朋友仍可以留下訊息給你,當你上網時就能立即看到,任何說話都冇走失。
 http://messenger.yahoo.com.hk
-- 
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] Buffer size

2006-01-17 Thread Opqrst Ghrst
hello,

thanks to reply.
but by my test, if my cpu not slow when I use buffer
32kb to send 50MB file only cost 13Mins,
with 8kb it must cost  almost 20Mins.
It not always can up to max speed, but maybe better
for slow cpu works.

  
--- Francois Piette <[EMAIL PROTECTED]> 說:

> Actully, the buffer size you use to transmit receive
> is not critical at all. It has to be large
> enoug in orther to not have too much OnDataSent or
> OnDataAvailable events triggeres which would
> consume CPU and in case you have a slow CPU, you
> couldn't sustain the line speed when the line speed
> is high (such as Gigabit). If the buffer is too
> large, it is simply a waste on memory.
> 
> In the http component, the buffer is used in a way
> that the maximum header line must fit into the
> receive buffer. A part from that, the buffer could
> be reduce without significant impact.
> 
> To send files, it is better to have a buffer which
> is a multiple of the maximum packet size (MTU).
> But if you have several physical layers (LAN and PPP
> for example), it is difficult to adjust the
> buffer size dynamically. All in all, 4KB is a good
> value in most situations.
> 
> --
> 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: "David A. G." <[EMAIL PROTECTED]>
> To: 
> Sent: Tuesday, January 17, 2006 1:44 AM
> Subject: [twsocket] Buffer size
> 
> 
> > Hello all, sorry if this topic was posted some
> times.
> >
> > I making a protocol to transfer files via TCP
> using a mixed mode (binary and
> > text).
> > I searched in ICS Components for the better buffer
> size:
> >
> > in HTTP protocol I found HTTP_SND_BUF_SIZE = 8193
> >
> > I made tests and this value works great for LAN
> transferences but using
> > internet I (through some linux routers) got blocks
> always minor than 1423
> > bytes.
> > I'm doing something bad if I still using 8193 ?  
> (Delphi 7, WinXP)
> >
> > thanks
> > David
> >
> > -- 
> > To unsubscribe or change your settings for
> TWSocket mailing list
> > please goto
> http://www.elists.org/mailman/listinfo/twsocket
> > Visit our website at http://www.overbyte.be
> 
> -- 
> To unsubscribe or change your settings for TWSocket
> mailing list
> please goto
> http://www.elists.org/mailman/listinfo/twsocket
> Visit our website at http://www.overbyte.be
> 


___
 YM - 離線訊息
 就算你沒有上網,你的朋友仍可以留下訊息給你,當你上網時就能立即看到,任何說話都冇走失。
 http://messenger.yahoo.com.hk
-- 
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: 回覆: Re: 回覆: Re: [twsocket] ThttpCil Send bufsize problem

2006-01-12 Thread Opqrst Ghrst
Hello Wilfried,

On HttpCli1->>CtrlSocket->BufSize I set 32768 it's OK
but when I Http Post to Send File it run at every
packet size 8193 not 32768, I think it seems has limit
so that I can not send over 8193 every packet size.
In TidHttp->SendBufferSize set 32768 it works well
every packet size is 32768.
See this Image.

http://img79.imageshack.us/img79/2092/ics0rl.jpg

I know Change buffer size cannot change upload speed,
But I use ADSL 8M / 640 kbps it should has max upload
speed with 80 kb/s. 
if I send every packet size 32768 it can up to 50kb/s
speed.
by 8193 only has 20kb/s speed.
I want to use my max upload speed and how can I to do?
  
Kind Regards

--- Wilfried Mestdagh <[EMAIL PROTECTED]> 說:

> Hello Opqrst,
> 
> > HttpCli1->>CtrlSocket->BufSize property, and I
> don't
> > know how to set can more than 8193 even to 32768
> or
> 
> You can set this to any value (it's integer), but if
> you let it default
> you will probably have best performance.
> 
> > Because by this way I can Upload with my full
> upload
> > connect speed.
> 
> Changing the buffer size will not change upload
> speed. This because, as
> Francois already have mentioned, ethernet packet
> size is 1514 bytes. If
> you have PPP connection then packetsize is 512
> bytes. This is low level
> and nothing to do with ICS or any other components.
> 
> ---
> Rgds, Wilfried [TeamICS]
> http://www.overbyte.be/eng/overbyte/teamics.html
> http://www.mestdagh.biz
> 
> Wednesday, January 11, 2006, 21:56, Opqrst Ghrst
> wrote:
> 
> 
> > Hi
> 
> > I want to change the send buffer  just like
> Tidhttp it
> > property "SendBufferSize" , at ThttpCli I only
> change
> > it to max 8193 limit by set
> HttpCli1->>CtrlSocket->BufSize property, and I don't
> > know how to set can more than 8193 even to 32768
> or
> > more.
> > Because by this way I can Upload with my full
> upload
> > connect speed.
> > Dose ThttpCli has just like this property to set?
> 
> > sorry for my poor english.
> 
> > --- Francois PIETTE <[EMAIL PROTECTED]>
> 說:
> 
> >> > I try use TIdhttp it can send with packet 32768
> >> size.
> >> 
> >> That is not possible. Maximum packet size is 1514
> >> bytes on Ethernet it is 
> >> much less on modem links. You probably confuse
> the
> >> maximum buffer size you 
> >> may send and the packet size on the network.
> Totally
> >> different things.
> >> 
> >> THttpCli can send any data size. You don't have
> to
> >> worry about winsock 
> >> buffer size.
> >> 
> >> > But when I use this Object and HttpCli at the
> same
> >> > time I cannot complier. It seems these two
> object
> >> > cannot use the same time.
> >> 
> >> Strange. But easy solution: use only THttpCli !
> >> I can't help you more if you don't tell the error
> >> message you get. The 
> >> compiler always give error messages which give an
> >> incredible help to solve 
> >> problems. Seems you are neglecting those messages
> >> :-(
> >> 
> >> --
> >> [EMAIL PROTECTED]
> >> http://www.overbyte.be
> >> 
> >> 
> >> - Original Message - 
> >> From: "Opqrst Ghrst" <[EMAIL PROTECTED]>
> >> To: "ICS support mailing" 
> >> Sent: Tuesday, January 10, 2006 8:42 AM
> >> Subject: 回覆: Re: [twsocket] ThttpCil Send
> bufsize
> >> problem
> >> 
> >> 
> >> >
> >> > Thanks for your reply.
> >> > I try use TIdhttp it can send with packet 32768
> >> size.
> >> > But when I use this Object and HttpCli at the
> same
> >> > time I cannot complier. It seems these two
> object
> >> > cannot use the same time.
> >> >
> >> > --- Francois PIETTE
> <[EMAIL PROTECTED]>
> >> 說:
> >> >
> >> >> > Q1:
> >> >> > I set HttpCli1->CtrlSocket->BufSize=32768
> >> >> > ,but when I send data it only has Max
> BufSize
> >> >> 8193.
> >> >> > How can I set it more than 8193 and has it
> Max
> >> >> limit?
> >> >>
> >> >> Sending buffer size doesn't change much at the
> >> >> network layer. HTTP use TCP
> >> >> and TCP is a stream oriented proptocol.
> Default
> >> >> buffer size fit the largest
&

回覆: Re: 回覆: Re: [twsocket] Thttp Cil Send bufsize problem

2006-01-11 Thread Opqrst Ghrst

Hi

I want to change the send buffer  just like Tidhttp it
property "SendBufferSize" , at ThttpCli I only change
it to max 8193 limit by set
HttpCli1->CtrlSocket->BufSize property, and I don't
know how to set can more than 8193 even to 32768 or
more.
Because by this way I can Upload with my full upload
connect speed.
Dose ThttpCli has just like this property to set?

sorry for my poor english.

--- Francois PIETTE <[EMAIL PROTECTED]> 說:

> > I try use TIdhttp it can send with packet 32768
> size.
> 
> That is not possible. Maximum packet size is 1514
> bytes on Ethernet it is 
> much less on modem links. You probably confuse the
> maximum buffer size you 
> may send and the packet size on the network. Totally
> different things.
> 
> THttpCli can send any data size. You don't have to
> worry about winsock 
> buffer size.
> 
> > But when I use this Object and HttpCli at the same
> > time I cannot complier. It seems these two object
> > cannot use the same time.
> 
> Strange. But easy solution: use only THttpCli !
> I can't help you more if you don't tell the error
> message you get. The 
> compiler always give error messages which give an
> incredible help to solve 
> problems. Seems you are neglecting those messages
> :-(
> 
> --
> [EMAIL PROTECTED]
> http://www.overbyte.be
> 
> 
> - Original Message - 
> From: "Opqrst Ghrst" <[EMAIL PROTECTED]>
> To: "ICS support mailing" 
> Sent: Tuesday, January 10, 2006 8:42 AM
> Subject: 回覆: Re: [twsocket] ThttpCil Send bufsize
> problem
> 
> 
> >
> > Thanks for your reply.
> > I try use TIdhttp it can send with packet 32768
> size.
> > But when I use this Object and HttpCli at the same
> > time I cannot complier. It seems these two object
> > cannot use the same time.
> >
> > --- Francois PIETTE <[EMAIL PROTECTED]>
> 說:
> >
> >> > Q1:
> >> > I set HttpCli1->CtrlSocket->BufSize=32768
> >> > ,but when I send data it only has Max BufSize
> >> 8193.
> >> > How can I set it more than 8193 and has it Max
> >> limit?
> >>
> >> Sending buffer size doesn't change much at the
> >> network layer. HTTP use TCP
> >> and TCP is a stream oriented proptocol. Default
> >> buffer size fit the largest
> >> TCP packet on Ethernet network.
> >>
> >> > Q2:
> >> > Dose HttpCli1->SendStream has Size limit?
> >> > When I send more than 100MB file, It seems not
> >> works.
> >>
> >> Actually it works :-)
> >> When you say "it doesn't work", I can't help you.
> >> You must give more details
> >> about what doesn't work. You must given error
> >> message or symptoms.
> >>
> >> --
> >> [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


___
 YM - 離線訊息
 就算你沒有上網,你的朋友仍可以留下訊息給你,當你上網時就能立即看到,任何說話都冇走失。
 http://messenger.yahoo.com.hk
-- 
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] ThttpCil Send bufsize problem

2006-01-09 Thread Opqrst Ghrst

Thanks for your reply.
I try use TIdhttp it can send with packet 32768 size.
But when I use this Object and HttpCli at the same
time I cannot complier. It seems these two object
cannot use the same time.

--- Francois PIETTE <[EMAIL PROTECTED]> 說:

> > Q1:
> > I set HttpCli1->CtrlSocket->BufSize=32768
> > ,but when I send data it only has Max BufSize
> 8193.
> > How can I set it more than 8193 and has it Max
> limit?
> 
> Sending buffer size doesn't change much at the
> network layer. HTTP use TCP 
> and TCP is a stream oriented proptocol. Default
> buffer size fit the largest 
> TCP packet on Ethernet network.
> 
> > Q2:
> > Dose HttpCli1->SendStream has Size limit?
> > When I send more than 100MB file, It seems not
> works.
> 
> Actually it works :-)
> When you say "it doesn't work", I can't help you.
> You must give more details 
> about what doesn't work. You must given error
> message or symptoms.
> 
> --
> [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


___
 YM - 離線訊息
 就算你沒有上網,你的朋友仍可以留下訊息給你,當你上網時就能立即看到,任何說話都冇走失。
 http://messenger.yahoo.com.hk
-- 
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

[twsocket] ThttpCil Send bufsize problem

2006-01-06 Thread Opqrst Ghrst
Q1:
I set HttpCli1->CtrlSocket->BufSize=32768
,but when I send data it only has Max BufSize 8193.
How can I set it more than 8193 and has it Max limit?
Q2:
Dose HttpCli1->SendStream has Size limit? 
When I send more than 100MB file, It seems not works.

___
 YM - 離線訊息
 就算你沒有上網,你的朋友仍可以留下訊息給你,當你上網時就能立即看到,任何說話都冇走失。
 http://messenger.yahoo.com.hk
-- 
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