[python-win32] Asynchronous UDP socket programming
Jens B. Jorgensen
jens.jorgensen@tallan.com
Fri, 18 Oct 2002 17:41:27 -0500
The "Windows" way to do asynchronous sockets is to either call
WSAAsyncSelect to tell winsock to post a windows message to a windows
message queue (you pass an HWND) or you can call WSAEventSelect to have
an Event object signalled. It looks liek WSAAsyncSelect is not available
in the win32 extensions but WSAEventSelect is.
However, select should work fine for you. I say that because I have
written a fair amount of socket code (both UDP and TCP) that uses select
and runs "asynchronously" (in the sense that the code would use select()
rather than just calling recv() and waiting indeterminately). It worked
fine for me. What's your problem exactly? Could you be a little more
specific than just saying you failed? Could you perhaps send us code
examples? Help us help you!
Yu Lei-LEIYU1 wrote:
>Hi, Everyone,
> I tried to write asynchrous UDP socket program but failed. All the examples
>I found on the web for asynrhous socket programming is for TCP socket. Does
>UDP or TCP make a difference? Does anyone have any example code for
>asynchronous UDP socket program on Windows? Is there any other solutions
>than using select?
>
>Thanks.
>
>Lei
>
>_______________________________________________
>Python-win32 mailing list
>Python-win32@python.org
>http://mail.python.org/mailman/listinfo/python-win32
>
>
--
Jens B. Jorgensen
jens.jorgensen@tallan.com
"With a focused commitment to our clients and our people, we deliver value through customized technology solutions"