lthibault / quic-mangos

A QUIC transport for mangos (scalability protocols) written in pure Go
Apache License 2.0
24 stars 2 forks source link

The example doesn't build out of the box #6

Closed ghost closed 5 years ago

ghost commented 6 years ago

What's wrong: When trying to build, I get:

net.go:241:16: too many arguments in call to r.Session.Close

How to reproduce:

Coplaint is that Session.Close(nil) is not the correct signature.

lthibault commented 6 years ago

Thanks for reporting this! It looks like the upstream github.com/lucas-clemente/quic-go changed the Session interface. It used to be that quic.Session had the function Close(err error) error, but this has been supplanted with

type Session interface {
    ...
    Close() error
    CloseWithError(error) error
}

I've made the necessary changes; everything should now work as expected.

Out of pure curiosity, what are you using this library for?

ghost commented 6 years ago

image

So, even with the upstream changes, I still get build errors.

To answer you question, I was evaluating this for as potential production quality implementation of QUIC.

lthibault commented 6 years ago

Hi Karim, Fear not -- we'll get this working for you ;)

  1. Can you show me your code?
  2. Why/what are you vendoring?
  3. Are you able to run the example? If not, can you try running it without the vendoring just to make sure everything works as expected at that level?

I was evaluating this for as potential production quality implementation of QUIC.

May I ask what the use-case for such an implementation be? I just like to have an idea of what users are doing -- it help make good decisions.

ghost commented 5 years ago

Sorry for the slow reply. We've already moved on. The use case intent was to provide low latency messaging between micro-services intended as data resolution points for a GraphQL proxy.

My code is very very simple. 'go get' the package as described in the markdown... go into the example directory and run go build. I've not added any code on top of it.

Personally hope you get this working, it seems very interesting and promising.

here is the attempt from this morning:


# command-line-arguments
example/pair/main.go:29:35: cannot use quic.NewTransport() (type "github.com/nanomsg/mangos".Transport) as type "nanomsg.org/go-mangos".Transport in argument to s0.AddTransport:
    "github.com/nanomsg/mangos".Transport does not implement "nanomsg.org/go-mangos".Transport (wrong type for NewDialer method)
        have NewDialer(string, "github.com/nanomsg/mangos".Socket) ("github.com/nanomsg/mangos".PipeDialer, error)
        want NewDialer(string, "nanomsg.org/go-mangos".Socket) ("nanomsg.org/go-mangos".PipeDialer, error)
example/pair/main.go:30:35: cannot use quic.NewTransport() (type "github.com/nanomsg/mangos".Transport) as type "nanomsg.org/go-mangos".Transport in argument to s1.AddTransport:
    "github.com/nanomsg/mangos".Transport does not implement "nanomsg.org/go-mangos".Transport (wrong type for NewDialer method)
        have NewDialer(string, "github.com/nanomsg/mangos".Socket) ("github.com/nanomsg/mangos".PipeDialer, error)
        want NewDialer(string, "nanomsg.org/go-mangos".Socket) ("nanomsg.org/go-mangos".PipeDialer, error)```