[newbie] trying socket as a replacement for nc
Roy Smith
roy at panix.com
Sun Dec 15 10:51:19 EST 2013
In article <l8kh1r$bj8$1 at reader1.panix.com>,
Grant Edwards <invalid at invalid.invalid> wrote:
> UDP is a a _datagram_ service. Either all the bytes in a write()
> should get sent or none of them. Sending a paritial datagram is _not_
> a valid option.
I would agree with the above if you said send() instead of write().
Python socket objects don't have write() methods, file objects do. You
can wrap a file around a socket with socket.makefile(), but I'm not sure
I would expect the UDP record boundary semantics to be honored once you
did that.
More information about the Python-list
mailing list