[nanomsg] Re: mangos has a compatibility shim

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

On May 13, 2014 at 10:55:54 AM, Jason E. Aten (j.e.aten@xxxxxxxxx) wrote:

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!
Ok, cool.  From mangos perspective, its always the whole message.



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.


I’ll try this out later today.

        - Garrett

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: