[Mono-bugs] [Bug 349688] New: SocketFlags.Partial is not implemented correctly in Linux

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Tue Dec 18 23:51:01 EST 2007


https://bugzilla.novell.com/show_bug.cgi?id=349688


           Summary: SocketFlags.Partial is not implemented correctly in
                    Linux
           Product: Mono: Class Libraries
           Version: 1.2.6
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: Major
          Priority: P5 - None
         Component: System
        AssignedTo: mono-bugs at ximian.com
        ReportedBy: andrew at ishiboo.com
         QAContact: mono-bugs at ximian.com
          Found By: Customer


There are a few issues with SocketFlags.Partial. Mono maps this flag to
MSG_MORE in Linux. MSG_MORE is not the same thing as Partial. Partial is
described as a short read/write. MSG_MORE is a buffered read/write which is
enables TCP and UDP 'corking' on Linux. (see man 7 tcp for TCP_CORK)

Assume a 1mb buffer of data. Under Windows, if Send() is called with Partial
specified, it may send 100k (arbitrary number) and then the app could call
Send() again with the rest, or possibly decide to "timeout" (note: 100k was
sent on the wire). Under Linux, if Send() is called with the same buffer and
the Partial flag, it will never send the entire 1mb (or any portion of it)
unless Send() is called again without the Partial flag. That can never produce
the same behavior.

Additionally, Windows ignores the Partial flag on UDP sockets. It always sends
immediately (no exception, no error). Under Linux, UDP supports corking and
because Partial == MSG_MORE, it enables corking when used. This deviates from
the Windows behavior.


-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list