Almost two weeks ago I sent the mail below.
I've been looking for a good way to achieve my goal with what APIs I found in LispWorks.
For Unix, I found a good way by using process-wait-with-timeout, the right wait-function (which checks read-readyness of the server socket using socket-listen) and mp:notify-fd.
When working on a solution that would work on Windows, I noticed that socket-listen behaves very differently on windows: it won't return T when a socket is ready to accept new connections. The unix variant *does* include that behaviour.
Also, making a stream from the socket fd [make-instance 'comm::socket-stream] doesn't work either: it sends system:wait-for-input-streams into endless recursion.
Now, I'm absolutely not afraid of a bit of Foreign Function Interface programming, but if this is at all possible, I'd like a hint from your side, hopefully to a function which already provides the 'wait-for-all-streams-including-passive-sockets(servers)-at-once' behaviour.
Could you help me out please? I used the suggestion you gave me last time to look in other sockets libraries on the net, but those don't provide this functionality.
Thank you very much for any information you can provide.
bye,
Erik.
On 5/7/07, lisp-support@lispworks.com lisp-support@lispworks.com wrote:
The LispWorks Support call tracking system attaches an id number to the subject line of each new call we receive.
Your message about
Sockets / COMM-package questions: select()-like function && UDP sockets
has been entered into our call tracking system as id 35530. Please put (Lisp Support Call #35530) in the subject line of any further mail about this call. (Note that replying to this or any further messages from us about this call will do this for you automatically).
Thank you for using LispWorks Products
The LispWorks Support Team
-------------------------------------------------------- Hi! Martin?
I've sent you mails before regarding the Lispworks COMM package because of my work for the usocket project for a portable sockets access implementation.
It turns out that I'm going to succeed to go where no portability library has gone before: UDP sockets. I'm currently working on 'efficient multiple socket waiting' (ie select() call like behaviour) and it looks like LispWorks provides something like it with its wait-for-input-streams function. I do have questions about it though:
1) From the reference material I've concluded it's only available on LispWorks 5.0. Is there anything you recommend using for 4.x? 2) When I've got a server socket retrieved through create-tcp-socket-for-service, is that a stream object I can pass to wait-for-input-stream?
And, although I haven't completed implementing the wait-behaviour yet, I'm also collecting data on creation of UDP sockets. You can find what I have so far on http://trac.common-lisp.net/usocket/wiki/DatagramSockets. What you'll find is that of all supported implementations, LispWorks is the only one I haven't been able to identify a means to create (and use) UDP sockets for. I'm hoping you can help me here, because the sources you've referred me to in the past (acl-compat) don't 'do' UDP.
I hope you can give me some directions or direct help!
Thanks for your time in any case.
bye,
Erik Huelsmann main author of usocket
PS: If you're interested: I've published a (work in progress) api description at http://common-lisp.net/project/usocket/api-docs.shtml.