|
-
January 28th, 2009, 11:12 AM
#1
Unknown data size - Socket proggramming
Hello,
How can I use an unknown buffer size to store bytes which sended through a socket? [the buffer will fit itself according to the length of the data]
Currently, I am using a big byte array, but a lot of memory is wasted because most of the time there is no need for such a big buffer
-
January 28th, 2009, 01:49 PM
#2
Re: Unknown data size - Socket proggramming
You can send the data in chunks and on the client use ArrayList or some other collection to build the complete buffer. I was also using StringBuilder in a couple of situations.
Last edited by gecka; January 28th, 2009 at 01:51 PM.
Using .NET 2.0 
-
January 28th, 2009, 02:35 PM
#3
Re: Unknown data size - Socket proggramming
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|