gcl-devel
[Top][All Lists]
Advanced

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

Re: [Gcl-devel] Re: Using sockets in gcl


From: Marc Mertens
Subject: Re: [Gcl-devel] Re: Using sockets in gcl
Date: Mon, 3 May 2004 21:43:09 +0200
User-agent: KMail/1.6.1

On Monday 03 May 2004 08:50, Chris Hall wrote:
> Marc Mertens <address@hidden> writes:
> > Hello,
> >
> >      I want to use sockets to communicated with a server application
> > using gcl (to add support for gcl to Jabberwocky). I found some
> > references (see http://savannah.gnu.org/forum/forum.php?forum_id=1610)
> > that sockets where supported and I think can use si::socket to connect
> > to a server given a port and address but I don't know how I can use
> > the result returned by si::socket to create a read/write stream on
> > this socket. I Any help is really appreciated.
> >
> > Thanks
> >
> >
> > Marc
>
> Aloha - you aren't alone in this, a couple of us have been trying this
> stuff out.
>
> In a word, 'si::socket' returns a two-way stream that you can read-line
> From and print/format to.  Below is a snippet that Camm Maquire sent
> recently sent in response to a question on the list.  It shows the very
> basic stuff needed to demonstarte that things are working - I've tried
> it on Debian Linux, and someone else did on Windows, and it worked for
> each of us.
>
> If it helps any, a lot of the rest of the socket code seems to have been
> developed in order to support the Tk portion of Tcl/Tk, which can be
> used by GCL for GUI apps.
>
> Good luck!
> +Chris
>
> (--------- example -------------)
> From: Camm Maguire <address@hidden>
> Subject: Re: GCL Socket questions
> Newsgroups: gmane.lisp.gcl.devel, gmane.comp.mathematics.axiom.devel
> Cc: , address@hidden, root <address@hidden>, address@hidden
> Date: 28 Apr 2004 21:58:03 -0400
>
> Greetings!
>
> OK here is a start:
>
> 1) Install netcat
> 2) in a shell, do nc -l -p 1920
> 3) In gcl osmehwere else, (setq s (si::socket 1920 :host "localhost"))
> 4) (format s "hello%") ; should appear in netcat window
> 5)  Type "there <cr>" in netcat window
> 6) In gcl (read-line s) ; (should get "there")
> 7) In gcl (close s) ; should terminate netcat.
> (--------- /example ------------)

Thanks a lot for your help, I didn't realize that it was that simple.

Marc




reply via email to

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