[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: data type ByteBuffer

From: Clinton Ebadi
Subject: Re: data type ByteBuffer
Date: Sat, 08 May 2004 11:44:42 -0400

On Thu, 2004-05-06 at 03:39, Steven Wu wrote:
> I wonder if there is a built-in simple data type like ByteBuffer in 
> Java, or Message_Block in ACE. It seems to me, when dealing with 
> network programing, such a data type can be very efficient. The 
> Message_Block in ACE emulates SysV message block used in device driver 
> with reference counting, and the concept of adding continue blocks. It 
> shouldn't be very hard to implement the similar thing in guile.
> steve

Would a uniform byte vector (or array if you need more than one
dimension) work?

(make-uniform-vector size #\nul &fill)

You can use the helper procedures uniform-vector-read! and
uniform-vector-write to read and write data from/to a port or a file
descriptor. Uniform vectors and arrays are documented in the Guile
manual, (guile)->Compound Data Types->Arrays->Uniform Arrays.
AIM:unknownlamer IRC:address@hidden
I use Free Software because I value freedom over features.

Attachment: signature.asc
Description: This is a digitally signed message part

reply via email to

[Prev in Thread] Current Thread [Next in Thread]