asyncore's lack of sendto(), recvfrom()

H

Henry 'Pi' James

Is there any good reason why sendto() and recvfrom() aren't wrapped by
asyncore? Obviously, recvfrom() cannot be replaced by recv(), but even
sendto() cannot be replace by connect() and send(), either:

I'm writing a traceroute module, and I found out that under the
current firewall configuration of my OS, sending an ICMP packet via
sendto() doesn't trigger a connection confirmation (the packet is
silently and successfully sent), while connect() does (the firewall
reports an attempted UDP connection, I'm sure why). I know Python
merely wraps send() and sendto() from <sys/socket.h> of the OS,
obviously there are some important subtle differences between the two.

Now, if I'd want to add sendto() and recvfrom() to asyncore, would it
be sufficient to simply copying its send() and recv() wrapper
functions and change the names and arguments, or are there more
modifications required?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top