Re: Convert byte stream to user defined type/class
- From: "Jon Skeet [C# MVP]" <skeet@xxxxxxxxx>
- Date: 30 Jan 2006 06:49:37 -0800
Macca wrote:
> My application receives data from multiple sources transferred over
> ethernet. This data is broken into packets of bytes before being transmitted
> over the network.
>
> My application has to take the data and arrange into a user defined
> type/class.
>
> e.g one message from source 1 may be 10-15KB. This is broken down into
> smaller packets say for arguments sake 1KB.
>
> My application then has to take each packet and construct the data back into
> it's orginal size of 15KB.
>
> This will probably be stored in some sort of array/arraylist of doubles
> rather than bytes.
>
> My question is :- what is the best/most efficient way of converting the
> individual packets of bytes into an array of say doubles?
It's not clear whether you're only controlling the reading side or not.
Do you get to decide how to write the data *and* how to read it, or is
the data you're reading already in a fixed format?
Jon
.
- Prev by Date: Re: OOPS Newbie - Removing objects from form controls
- Next by Date: .NET 2.0 System.Net.CredentialCache
- Previous by thread: Application Reference
- Next by thread: Re: Convert byte stream to user defined type/class
- Index(es):
Relevant Pages
|