streamwriter.write

  • Thread starter Thread starter cloud
  • Start date Start date
C

cloud

hello all,
i have littile problem with streamwriter.write
the string which i am going to write is very very large (for example
7mb)
if we are writing that large string to the network stream using
streamwriter.write(teststring)
it takes some time to write that string.

Mean while is it possible to know how much it has written..

Thank you
 
hello all,
i have littile problem with streamwriter.write
the string which i am going to write is very very large (for example
7mb)
if we are writing that large string to the network stream using
streamwriter.write(teststring)
it takes some time to write that string.

Mean while is it possible to know how much it has written..


Is there anyway you can chunk the data up into logical bits? If so, I
would aim for this option. A single write seems rather inefficient - in
most apps, at least.

If not, you have the stream option to output in smaller chunks. You can
feed a string into a memory stream and then stream to the streamwriter.

If you can chunk up the message, you have a fairly easy way to keep
track of what has been written. Set up the right "chunk" size and you
have a more efficient method of saving, which may increase performance
(ie, use the right size buffer).

I do not know of any method to query a write operation for percentage,
however.

Peace and Grace,


--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

Twitter: @gbworld
Blog: http://gregorybeamer.spaces.live.com

My vacation and childhood cancer awareness site:
http://www.crazycancertour.com

*******************************************
| Think outside the box! |
*******************************************
 
Is there anyway you can chunk the data up into logical bits? If so, I
would aim for this option. A single write seems rather inefficient - in
most apps, at least.

If not, you have the stream option to output in smaller chunks. You can
feed a string into a memory stream and then stream to the streamwriter.

If you can chunk up the message, you have a fairly easy way to keep
track of what has been written. Set up the right "chunk" size and you
have a more efficient method of saving, which may increase performance
(ie, use the right size buffer).

I do not know of any method to query a write operation for percentage,
however.

Peace and Grace,

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

Twitter: @gbworld
Blog:http://gregorybeamer.spaces.live.com

My vacation and childhood cancer awareness site:http://www.crazycancertour.com

*******************************************
|      Think outside the box!             |
*******************************************

While writing from memory stream to networkstream
how do i know the state..that how many bytes are written to the
networkstream...

Thanks for any suggestion
 
Back
Top