From: ··············@googlemail.com
Subject: CMUCL sockets
Date: 
Message-ID: <1164399847.140787.172490@m7g2000cwm.googlegroups.com>
Hello,
  I'm new to CL and was just playing around with CMUCL sockets
routines.  I'm trying to communicate between two lisp processes on the
same machine from the top-level.  It seems that I can setup a
connection just fine, but can't read anything once I've written to the
fd-stream.  Here's a transcript of my top-level interactons:

Lisp A
> (setf socket (ext:create-inet-listener 3300))
> (setf fdA (ext:accept-tcp-connection socket))
...and it begins waiting...

Lisp B
> (setf fdB (ext:connect-to-inet-socket "localhost" 3300))
...at this point I can see the call in Lisp A return with a FD
...as well as the preceding call in Lisp B...

Lisp A
> (setf sock-streamA (sys:make-fd-stream fdA :input t :output t))

Lisp B
> (setf sock-streamB (sys:make-fd-stream fdB :input t :output t))

...here's were my problems begin...

Lisp A
> (format sock-streamA "can you see me?")
> (finish-output sock-streamA)

Lisp B
> (read-line sock-streamB nil nil)
...and then Lisp B just sits there.  If I enter it will return to the
prompt, but no value is returned.

I know plenty of people have gotten this to work.  I guess I'm not one
of them.  Any help or advice is appreciated.

Thanks.

From: Pascal Bourguignon
Subject: Re: CMUCL sockets
Date: 
Message-ID: <87ejrsio6c.fsf@thalassa.informatimago.com>
···············@googlemail.com" <··············@googlemail.com> writes:

> Hello,
>   I'm new to CL and was just playing around with CMUCL sockets
> routines.  I'm trying to communicate between two lisp processes on the
> same machine from the top-level.  It seems that I can setup a
> connection just fine, but can't read anything once I've written to the
> fd-stream.  Here's a transcript of my top-level interactons:
>
> Lisp A
>> (setf socket (ext:create-inet-listener 3300))
>> (setf fdA (ext:accept-tcp-connection socket))
> ...and it begins waiting...
>
> Lisp B
>> (setf fdB (ext:connect-to-inet-socket "localhost" 3300))
> ...at this point I can see the call in Lisp A return with a FD
> ...as well as the preceding call in Lisp B...
>
> Lisp A
>> (setf sock-streamA (sys:make-fd-stream fdA :input t :output t))
>
> Lisp B
>> (setf sock-streamB (sys:make-fd-stream fdB :input t :output t))
>
> ...here's were my problems begin...
>
> Lisp A
>> (format sock-streamA "can you see me?")
>> (finish-output sock-streamA)
>
> Lisp B
>> (read-line sock-streamB nil nil)
> ...and then Lisp B just sits there.  If I enter it will return to the
> prompt, but no value is returned.
>
> I know plenty of people have gotten this to work.  I guess I'm not one
> of them.  Any help or advice is appreciated.

You didn't write a line.  How can you hope reading a line?
Write a line!

(format sock-streamA "can you see me?~%")


-- 
__Pascal Bourguignon__                     http://www.informatimago.com/

THIS IS A 100% MATTER PRODUCT: In the unlikely event that this
merchandise should contact antimatter in any form, a catastrophic
explosion will result.
From: ··············@googlemail.com
Subject: Re: CMUCL sockets
Date: 
Message-ID: <1164400804.283495.270490@h54g2000cwb.googlegroups.com>
Pascal Bourguignon wrote:
> ···············@googlemail.com" <··············@googlemail.com> writes:
>
> > Hello,
> >   I'm new to CL and was just playing around with CMUCL sockets
> > routines.  I'm trying to communicate between two lisp processes on the
> > same machine from the top-level.  It seems that I can setup a
> > connection just fine, but can't read anything once I've written to the
> > fd-stream.  Here's a transcript of my top-level interactons:
> >
> > Lisp A
> >> (setf socket (ext:create-inet-listener 3300))
> >> (setf fdA (ext:accept-tcp-connection socket))
> > ...and it begins waiting...
> >
> > Lisp B
> >> (setf fdB (ext:connect-to-inet-socket "localhost" 3300))
> > ...at this point I can see the call in Lisp A return with a FD
> > ...as well as the preceding call in Lisp B...
> >
> > Lisp A
> >> (setf sock-streamA (sys:make-fd-stream fdA :input t :output t))
> >
> > Lisp B
> >> (setf sock-streamB (sys:make-fd-stream fdB :input t :output t))
> >
> > ...here's were my problems begin...
> >
> > Lisp A
> >> (format sock-streamA "can you see me?")
> >> (finish-output sock-streamA)
> >
> > Lisp B
> >> (read-line sock-streamB nil nil)
> > ...and then Lisp B just sits there.  If I enter it will return to the
> > prompt, but no value is returned.
> >
> > I know plenty of people have gotten this to work.  I guess I'm not one
> > of them.  Any help or advice is appreciated.
>
> You didn't write a line.  How can you hope reading a line?
> Write a line!
>
> (format sock-streamA "can you see me?~%")
>
>
> --
> __Pascal Bourguignon__                     http://www.informatimago.com/
>
> THIS IS A 100% MATTER PRODUCT: In the unlikely event that this
> merchandise should contact antimatter in any form, a catastrophic
> explosion will result.

Thanks alot!  Can't believe I missed something so simple.