[nanomsg] Re: mangos has a compatibility shim

  • From: "Jason E. Aten" <j.e.aten@xxxxxxxxx>
  • To: nanomsg <nanomsg@xxxxxxxxxxxxx>, "Garrett D'Amore" <garrett@xxxxxxxxxx>
  • Date: Tue, 13 May 2014 10:55:54 -0700

Hi Garrett,

The Socket::Send() method in compat/compat.go:235 should return (int,
error), rather than just (error) to be API compatible. After I hacked that
in (but how to get the actual size sent?), I got compilation against compat
just fine. Excellent!

But sadness ensued when I ran my application's test suite when built
against compat/mangos.  Stuff just broke with "panic connection closed".
You can try my code and its test suite (go test -v) here:
https://github.com/glycerine/goq. You''ll just have to change one line,
line 18 of goq.go, from

nn "github.com/op/go-nanomsg"

to

nn "bitbucket.org/gdamore/mangos/compat"

Thanks again for mangos and compat. I'm really looking forward using the
(max message size) DOS protection you implemented.

Jason



On Sun, May 11, 2014 at 6:08 PM, Jason E. Aten <j.e.aten@xxxxxxxxx> wrote:

> On Sun, May 11, 2014 at 5:37 PM, Garrett D'Amore <garrett@xxxxxxxxxx>wrote:
>
>> I’ve implemented (at user request) bitbucket.org/gdamore/mangos/compat
>>
>
> Awesome. Thanks Garrett.
>
>

Other related posts: