From: Clinton Ebadi <clinton@unknownlamer.org>
Subject: Re: data type ByteBuffer
Date: Sat, 08 May 2004 11:44:42 -0400 [thread overview]
Message-ID: <1084031082.3050.19.camel@localhost> (raw)
In-Reply-To: <92C45B78-9F30-11D8-BD05-000A958866C4@qwest.net>
[-- Attachment #1.1: Type: text/plain, Size: 1017 bytes --]
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.
--
http://unknownlamer.org
AIM:unknownlamer IRC:unknown_lamer@freenode#hprog
I use Free Software because I value freedom over features.
[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
[-- Attachment #2: Type: text/plain, Size: 142 bytes --]
_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-devel
next prev parent reply other threads:[~2004-05-08 15:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-05-06 7:39 data type ByteBuffer Steven Wu
2004-05-06 9:53 ` Andreas Rottmann
2004-05-08 15:44 ` Clinton Ebadi [this message]
2004-05-08 16:09 ` Steven Wu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1084031082.3050.19.camel@localhost \
--to=clinton@unknownlamer.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).