[usocket-devel] Something about usocket-udp on Clozure CL

Chun Tian (binghe) binghe.lisp at gmail.com
Fri Jul 9 09:40:20 UTC 2010


Hi, Alex

I'm glad to tell you. I've fixed the USOCKET/Clozure USOCKET:SEND-TO issue. Now you can call SOCKET-SEND on connected usockets.

However, the work was committed on USOCKET trunk [1], not USOCKET-UDP. I want to mark USOCKET-UDP as a outdated package, and encourage people switching to USOCKET project. And current USOCKET trunk will be released as version 0.5 in short future.

For your project, it's very easy to do this switch: replace the "USOCKET-UDP" into "USOCKET" in your ASDF files, and change function call "SOCKET-CONNECT/UDP" into just "SOCKET-CONNECT". But, you should tell your user checkout USOCKET trunk until its next release.

Is this working for you?

Regards,

Chun Tian (binghe)

[1] svn://common-lisp.net/project/usocket/svn/usocket/trunk

> Hi Chun,
> 
> Thanks for answering me. Regarding the patch, i don't think i can even call it that, i just noticed that 'USOCKET:SOCKET-SEND (on clozure) always calls 'HOST-TO-HBO with the 'HOST parameter, which in my case was NIL, so i simply added a check there, i don't even know if i'm breaking some kind of expected behavior but i hope not. The patch is now *really* attached.
> 
> For the second issue, i meant that on USOCKET/Clozure USOCKET:SEND-TO does not work on *connected* sockets.
> 
> 
> Cheers,
> 
> Alex
> 
> 
> Quoting "Chun Tian (binghe)" <binghe.lisp at gmail.com>:
> 
>> Hi, Alex
>> 
>> Sorry for the late response. I'm a little busy.
>> 
>> So, a new Common Lisp package (cl-growl) is using my USOCKET-UDP,  that's a news for me. The Common Lisp UDP "market" is relatively  small, only few users I have. I hope this new package will make the  UDP package better.
>> 
>> I wrote USOCKET-UDP mainly for my SNMP package (cl-net-snmp). At  that time, USOCKET doesn't have UDP support, so I wrote USOCKET-UDP  as a patch to exist USOCKET package. From one year ago, I became one  of USOCKET maintainers, and current USOCKET trunk have merged all my  UDP work, plus the new Digitool MCL port. Unfortunately, due to the  lack support of SBCL and ECL on Windows platform, we haven't release  the new USOCKET version for long time. Above is the background.
>> 
>> For your first issue, I would like to see your patch on the  HOST-TO-HBO part, first. (You didn't attach it with your mail  actually)
>> 
>> For your second issue, I don't quite understand your points. Are you  saying USOCKET/Clozure currently cannot support SOCKET-SEND on  "connected socket" or "unconnected socket"?
>> 
>> I'm sure all bugs in USOCKET-UDP are fixable since we have all  Clozure CL source code in hand to see the bahaviour of their  internal functions.
>> 
>> Wait for your next post.
>> 
>> Regards,
>> 
>> Chun Tian (binghe)
>> 
>> 
>>> Hi, just recently i installed a Lisp library that uses your library  usocket-udp, so, first let me thank you for you work on that library.
>>> 
>>> I've had a few problems running a project (cl-growl) that uses your library.
>>> 
>>> First on clozure's 'socket-send definition there's a call to  'host-to-hbo that should have a check for nil being passed as host.  This was the first error i kept getting. I simply added a small  check (patch is attached) which solved the problem.
>>> 
>>> But the biggest problem i found concerns the fact that some  implementations (namely SBCL) work with UDP Connected sockets while  Clozure CL's implementation for instance will break. On calls to  'socket-send Clozure will be calling 'openmcl-socket:send-to which  is basically a wrapper call for the C function sendto() which will  (accordingly to the function documentation) return an EISCONN (56)  complaining the socket is already connected. This behavior imho  seems to break the 'unified' behavior the library attempts to  achieve.
>>> 
>>> I have no idea what the best path for achieving this unified  behavior should be but i felt it was my obligation to let you know  of these issues.
>>> 
>>> 
>>> Sorry for the big post,
>>> 
>>> Alex Paes
>>> 
>>> 
>>> 
>> 
>> 
> 
> 
> <usocket.patch>





More information about the usocket-devel mailing list