In the desktop app's memory the data is packed end-to-end already:
typedef struct MANGOpie
{
unsigned char mango;
unsigned short pie;
}
MANGOpie;
MANGOpie * pies = (MANGOpie *)malloc(count*sizeof(MANGOpie));
...and the entire 'pies' array is sent to the PHP script as binary data
usin
I'm actually moving from a string-encoded transport to binary for
compactness. The array can potentially get pretty large. I'm shooting
for the smallest possible representation of the data, which is 1 char
and 1 short per data point.
On February 23, 2010, Rene Veerman wrote:
have y
On Monday, February 22, 2010, php.l...@juun.com wrote:
>
> I have a desktop app that has a data structure that looks like this:
>
> typedef struct MANGOpie
> {
> unsigned char mango;
> unsigned short pie;
> }
> MANGOpie;
>
>
>
> I manage a C array of these things in memory:
>
> MANGOpie *
have you considered using json as transport?
http://json.org/ has code you can re-use.
On Tue, Feb 23, 2010 at 7:29 AM, php.l...@juun.com wrote:
>
> I have a desktop app that has a data structure that looks like this:
>
> typedef struct MANGOpie
> {
> unsigned char mango;
> unsigned short
I have a desktop app that has a data structure that looks like this:
typedef struct MANGOpie
{
unsigned char mango;
unsigned short pie;
}
MANGOpie;
I manage a C array of these things in memory:
MANGOpie * pies = (MANGOpie *)malloc(count*sizeof(MANGOpie));
I pass these to a PHP s
5 matches
Mail list logo