[Top][All Lists]

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

Re: read-string!/partial on non-file ports

From: Mike Gran
Subject: Re: read-string!/partial on non-file ports
Date: Mon, 10 Sep 2007 13:42:28 -0700 (PDT)

--- Luigi Semenzato <address@hidden> 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 , but, that code is pretty
ugly to use as an example.)

Hope this helps,

Mike Gran

reply via email to

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