Hi,
I would really like to use UDP sockets on Windows, so I'm wondering if someone can tell me what needs to be done for it to work on a minimal set of platforms (at least SBCL, and Clozure CL would be nice). I am willing to contribute time and code for the next week or so if someone can direct me to what needs work.
Thanks.
Hi, Elliott
I'm very sorry for that. Currently I'm trapping in other work and couldn't finish the promised UDP porting work immediately. My SNMP library also want to work on SBCL/win32, but ...
From my view, the biggest issue for this work, is the implementation of WAIT-FOR-INPUT-INTERNAL for UDP usockets. On Windows, there's no "select()" UNIX system call, so we have to use "WSAEventSelect" instead. I have no idea if SBCL/win32 have correspond internal functions which could be called directly by usocket.
Regards,
Chun Tian (binghe)
在 2010-3-22,11:44, Elliott Slaughter 写道:
Hi,
I would really like to use UDP sockets on Windows, so I'm wondering if someone can tell me what needs to be done for it to work on a minimal set of platforms (at least SBCL, and Clozure CL would be nice). I am willing to contribute time and code for the next week or so if someone can direct me to what needs work.
Thanks.
-- Elliott Slaughter
"Don't worry about what anybody else is going to do. The best way to predict the future is to invent it." - Alan Kay _______________________________________________ usocket-devel mailing list usocket-devel@common-lisp.net http://common-lisp.net/cgi-bin/mailman/listinfo/usocket-devel
2010/3/21 Chun Tian (binghe) binghe.lisp@gmail.com
Hi, Elliott
I'm very sorry for that. Currently I'm trapping in other work and couldn't finish the promised UDP porting work immediately. My SNMP library also want to work on SBCL/win32, but ...
From my view, the biggest issue for this work, is the implementation of WAIT-FOR-INPUT-INTERNAL for UDP usockets. On Windows, there's no "select()" UNIX system call, so we have to use "WSAEventSelect" instead. I have no idea if SBCL/win32 have correspond internal functions which could be called directly by usocket.
Oh, I didn't realize that UDP sockets were working at all on sbcl/win32. Even without wait-for-input, my application can achieve at least a minimal level of functionality (better than nothing).
Since there seems to be no select-like functionality built into sbcl/win32, is the right approach to call WSAEventSelect with sb-alien? (I assume that cffi is to avoided.) I can try to work on this is the next couple of days if this is the right way to go.
Thanks.
2010/3/21 Chun Tian (binghe) binghe.lisp@gmail.com
On Windows, there's no "select()" UNIX system call, so we have to use "WSAEventSelect" instead.
What about this?
http://msdn.microsoft.com/en-us/library/ms740141(VS.85).aspx
Looks rather like unix's select to me...
That said, sbcl/win32 doesn't have sb-unix, so it may not be possible to call this function without some custom FFI hacking, but it shouldn't be too bad.
Hi Elliott,
On Mon, Mar 22, 2010 at 9:16 PM, Elliott Slaughter elliottslaughter@gmail.com wrote:
2010/3/21 Chun Tian (binghe) binghe.lisp@gmail.com
On Windows, there's no "select()" UNIX system call, so we have to use "WSAEventSelect" instead.
What about this? http://msdn.microsoft.com/en-us/library/ms740141(VS.85).aspx Looks rather like unix's select to me...
Yup. It's really misleading, but the documentation talks about *sockets* not filehandles. It does that on purpose: the function doesn't apply to other handles than socket handles; not async pipes or files, only sockets. In that respect it's a lot different from unix select().
That said, sbcl/win32 doesn't have sb-unix, so it may not be possible to call this function without some custom FFI hacking, but it shouldn't be too bad.
Hope that explains it.
Bye,
Erik.