Socket module bug on OpenVMS
"Martin v. Löwis"
martin at v.loewis.de
Tue Oct 24 00:50:22 CEST 2006
Irmen de Jong schrieb:
> In my opinion Python's socket module itself could implement these
> workarounds. That would make user code a lot cleaner and less
> error prone, and more portable. What do other people think?
It depends: when VMS defines MSG_WAITALL, but doesn't implement it
correctly, then Python probably shouldn't expose it.
Implementing recv() "splitting" is *not* something that Python
could do itself. The question is how you do error reporting
for partial results, and neither exception handling nor error
codes are particularly well-suited to such an error model: these
APIs all assume an all-or-none failure model (i.e. if receiving
fails, nothing has happened so far). If you were to split a
large recv call into multiple smaller ones, there wouldn't be
a good way to communicate both the partial result and the error
that you got on the last call.
Perhaps you had some different work-around in mind?
More information about the Python-list