On Tue, Mar 22, 2011 at 3:56 PM, Martin Sustrik <[email protected]> wrote:
> 1. Mimic UDP, ie. recv into undersized buffer truncates the message, > however, there's MSG_PEEK flag, which allows you not to consume the message. > That allows you to check the size of the message in advance, allocate the > buffer and read it afterwards. Both options are horrid, IMO, and not compatible with the notion of building a better, (simpler?) API. > 2. Mimic SCTP's partial delivery. Read data into buffer, check whether EOR > was reached. If not read more data etc. Better... allows chunking of large messages. But it still means copying data. The risk I see here is that the native (non-POSIX) API may be more efficient and simpler, which means people won't use the POSIX API. If SCTP can define their own API semantics, I'd argue 0MQ can also do so. -Pieter _______________________________________________ zeromq-dev mailing list [email protected] http://lists.zeromq.org/mailman/listinfo/zeromq-dev
