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

2007-09-11 Thread Thien-Thi Nguyen
() "Luigi Semenzato" <[EMAIL PROTECTED]> () Mon, 10 Sep 2007 13:35:29 -0700 That's cool for writing, thanks. But what about reading? have you tried passing the socket's file descriptor to read-string!/partial? thi ___ Guile-user mailing list Guil

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

2007-09-10 Thread Luigi Semenzato
Wow, thanks for all the help. Mike and Kevin pointed out that it's probably best to use socketpair rather than pipe. Of course. I am such a troglodyte. Kevin's example looks robust and I used it almost verbatim (I assume it's OK). It works fine. Ludovic suggests that uniform vectors are bette

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

2007-09-10 Thread Ludovic Courtès
Hi, "Luigi Semenzato" <[EMAIL PROTECTED]> writes: > 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

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

2007-09-10 Thread Kevin Ryde
Mike Gran <[EMAIL PROTECTED]> writes: > > I wrote a peer-to-peer ap where I used "(display data socket)" to send > and "(read-string!/partial block socket-port)" to receive. That'd be the ticket, I use a `socketpair' and read-string to talk back and forward to a child process. You have to have

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

2007-09-10 Thread Mike Gran
--- Luigi Semenzato <[EMAIL PROTECTED]> 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

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

2007-09-10 Thread Luigi Semenzato
On 9/10/07, Stephen Compall <[EMAIL PROTECTED]> wrote: > On Mon, 2007-09-10 at 12:25 -0700, Luigi Semenzato wrote: > > 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 s

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

2007-09-10 Thread Stephen Compall
On Mon, 2007-09-10 at 12:25 -0700, Luigi Semenzato wrote: > 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 exactl

read-string!/partial on non-file ports

2007-09-10 Thread Luigi Semenzato
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 ge