unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Mike Gran <spk121@yahoo.com>
To: Luigi Semenzato <luigi@semenzato.com>, guile-user@gnu.org
Subject: Re: read-string!/partial on non-file ports
Date: Mon, 10 Sep 2007 13:42:28 -0700 (PDT)	[thread overview]
Message-ID: <235712.72749.qm@web37908.mail.mud.yahoo.com> (raw)
In-Reply-To: <c6bf18db0709101225t689bed3bq503694a4205ac9bb@mail.gmail.com>

--- Luigi Semenzato <luigi@semenzato.com> wrote:

> Greetings,
> 
> I would like to move binary data between two guile
> applications across a pipe (opened with open-input-output-pipe).
> Read-char and write-char in a loop are going to be too slow.
> Read-string!/partial and write-string/partial are exactly what
> I need but they only work on file ports.  (I get this error:
> Wrong type argument in position 2 (expecting open file port):
> #<input-output: soft 56f1d0>).
> Luigi-

In the past, I know that I have used read-string!/partial to read from
a socket. 

I wrote a peer-to-peer ap where I used "(display data socket)" to send
and "(read-string!/partial block socket-port)" to receive.  

I haven't tried it with a pipe, however.

(I used it in a rather confusing program found at
http://lonelycactus.com/code/schmolester , but, that code is pretty
ugly to use as an example.)

Hope this helps,

Mike Gran


_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-user


  parent reply	other threads:[~2007-09-10 20:42 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-10 19:25 read-string!/partial on non-file ports Luigi Semenzato
2007-09-10 19:51 ` Stephen Compall
2007-09-10 20:35   ` Luigi Semenzato
2007-09-11  7:18     ` Thien-Thi Nguyen
2007-09-10 20:42 ` Mike Gran [this message]
2007-09-10 23:49   ` Kevin Ryde
2007-09-10 23:19 ` Ludovic Courtès
2007-09-11  5:00   ` Luigi Semenzato

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=235712.72749.qm@web37908.mail.mud.yahoo.com \
    --to=spk121@yahoo.com \
    --cc=guile-user@gnu.org \
    --cc=luigi@semenzato.com \
    /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).