[Vortex] Sending binary data

Yourch, Chris chris at replicus.com
Thu Sep 6 18:12:09 CEST 2007


I would suggest that the docs mention that the data is just binary
bytes. Also, I would suggest that the function prototypes of the methods
that transmit the data are changed to "unsigned char *".

My confusion came from the fact that the data transmission functions
accept the data as a "char *" which indicated to me that the data was a
string.

-----Original Message-----
From: Jens Alfke [mailto:jens at mooseyard.com] 
Sent: Wednesday, September 05, 2007 7:21 PM
To: Yourch, Chris
Cc: vortex at lists.aspl.es
Subject: Re: [Vortex] Sending binary data


On 5 Sep '07, at 6:55 PM, Yourch, Chris wrote:

> So, "under the covers" a stream of byte's are actually sent? i.e. the
> const char * is cast to an unsigned char * and then sent?

Yes. There's no difference between the data pointed to by a char* and  
an unsigned char*. It's just bytes. The BEEP protocol itself doesn't  
care how you interpret the bytes in a message - you could cast them to  
unsigned char*, float*, struct foo*, whatever.

--Jens



More information about the Vortex mailing list