gcl-devel
[Top][All Lists]
Advanced

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

[Gcl-devel] Re: Re: Server sockets with GCL?


From: tdjohns1
Subject: [Gcl-devel] Re: Re: Server sockets with GCL?
Date: Wed, 5 May 2004 13:35:33 -0500


>> I've been following the discussion on sockets (thanks!) but my current
>> application requires a server socket.   I've examined the GCL implementation
>> of the server socket functions and have been able to create a server
>> socket and accept a connection from a client on another machine.

>I have this need as well - once connected, were you able to do anything
>at all with the socket?  I get mixed results reading, and GCL terminates
>on writing.  GCL 2.6.1 on Debian Woody w/2.2.25 kernel.


What is returned by ACCEPT-SOCKET-CONNECTION cannot be read or written (as
is possible with a socket resulting from SOCKET).  This is what I observe on
GCL 2.6.1 on Red Hat 8.0 (kernel 2.4.18-14).  

Maybe I'm confused, but I thought what comes back from an ACCEPT-SOCKET-CONNECTION
should be the same thing that comes back from SOCKET.

>> What I'm confused about is how to take the results obtained from calling
>> ACCEPT-SOCKET-CONNECTION and derive a pair of streams.

>I'd like to do this, too, but after looking at the existing C socket code
>that I can find in GCL and reading what Camm has to say, it seems it
>some work needs to be done on the C side.  I am, when I can spend the
>time, learning what I can about C socket programming on Linux.


Given what you say below, it sounds like you know what you're doing.
What I can't figure out (so far) is how the implementors meant to be using
file descriptors, streams and sockets in the current C implementation.

>> I did investigate the (somewhat) portable network functions contained
>> in the Common Lisp Open Code Collection (CLOCC) on SourceForge,
>> but the GCL implementation was incomplete.

>Actually, the CLOCC stuff is what led me to looking at the GCL source.
>I've hacked the essential bits of CLOCC to load into into GCL,
>e.g. changed to physical vs. logical pathnames, using '+gcl' etc., and
>tested/hacked one or two of the CLOCC network-related functions, but
>came to a screeching halt on socket-server - thus to the source.

You're a lot more determined than I am, certainly!

>My goal is to get at least the CLOCC network stuff to 'drop in' to GCL,
>then submit patches to the CLOCC maintainer.  (Did you see the CLOCC
>maintainer's comment about his 'half-hearted' attempt to invludr GCL?

Yes, I did notice that.  

>I'm in no way an expert on sockets *or* GCL, but I was thinking about
>perhaps USER-DEFINED-STREAMs, but after looking into, I think before
>that happens the underlying socket support needs some tweaking.
>
>It just now occured to me to look at the source for SI::SOCKET (doh! -
>I've been busy?) - surely the underlying C for that can be leveraged?

Probably.  

I've *used* sockets and server sockets in C and in Java but
don't particularly want to implement the low level mechanics for GCL.
After looking at what it returned by ACCEPT-SOCKET-CONNECTION, it
seems as if the original implementer had something in mind that I'm
just not following.  Mainly I believe that I'd just make things worse
if I tried to change the C code.

Tom Johnson

reply via email to

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