Thanks henrik A better API would be so great. Stef Le 1/6/15 15:18, Henrik Johansen a écrit :
On 29 May 2015, at 7:24 , Sven Van Caekenberghe <sven@stfx.eu> wrote:
On 29 May 2015, at 18:23, Henrik Johansen <henrik.s.johansen@veloxit.no> wrote:
On 19 May 2015, at 11:01 , Sven Van Caekenberghe <sven@stfx.eu> wrote:
On 19 May 2015, at 10:53, Udo Schneider <udo.schneider@homeaddress.de> wrote:
Did you look in all your package caches ? I did. Must have been a victim of cleaning ... but maybe TimeMachine has something ... thanks for the reminder.
If it is just a small example, like one class, maybe it could be added to the image, in which case it should indeed be a slice. The package was pretty simple. Basically only adding a few convenience methods around Socket>>#setOption:value: . Still I think a usage example in form of a class comment and test case might be appropriate. So unless Multicast should be part of the base image I'll start with a separate package first. Since Socket is a fundamental part, and multicast is a key feature, I think it would logical to move it to the image itself, with a test case. It's not just multicast... As a Socket newbie I recently spent longer than I care to admit learning you need to set SO_BROADCAST to true to not get a primitive failure when sending to a broadcast address. At least the comments in sqUnixSocket were entertaining!
Though I realize which options are actually supported depends on the VM, moving the list of potentially available cross-platform options (and a description of what they're used for) to a comment in the image (setOption: value: being the obvious location) might be a nice first step. Please help in the documentation effort. I later found the option names are already documented in getOption:, but since that wasn't of much help (at least to me), I suggest introducing a more specific error than primitiveFailure. Implementing that, the new test revealed a bug; empty UDP payloads will not be sent.
A suggested fix for both these issues can be found in SLICE-Issue-15657-Empty-UDP-packets-are-not-sent-HenrikSperreJohansen.1
Cheers, Henry