简体   繁体   中英

Python nonblocking sockets and reliable UDP

For a graduate-level project, I'm being asked to create a reliable UDP implementation in Python. I have experience with socket programming in Python, but mostly TCP or "fire and forget"-type UDP stuff. I essentially have to create UDP with TCP congestion control. My main question is this:

How can I send packets and receive acknowledgments at the same time? I think the problem is the blocking socket.recv() call. How is this typically handled?

Any help with this or general advice on implementing reliable UDP would be very helpful!

http://twistedmatrix.com/trac/ is a perfect match for your needs, its not very easy for newcomers though.

This blog is a great resource to start from: http://krondo.com/?page_id=1327

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM