Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add quic support #15

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Conversation

agilan2001
Copy link

Added support for QUIC protocol through the core QUIC module of NodeJS (v15 - pre)

NodeJS QUIC Documentation

Copy link
Member

@robertsLando robertsLando left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix lint issues. Also could you submit a test for that?

@agilan2001 agilan2001 closed this Jul 1, 2021
@agilan2001 agilan2001 reopened this Jul 1, 2021
@agilan2001
Copy link
Author

Added support for QUIC protocol through the core QUIC module of NodeJS (v15 - pre)

NodeJS QUIC Documentation

Builds pass only with the NodeJS 15 pre version (manual build) currently.

Copy link
Member

@getlarge getlarge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@agilan2001 Like @robertsLando said, we should have some tests to check that it works.
The problem is that QUIC seems to be only supported on Node 15 with a custom build, right ?
So i wonder how that would fit in the current tests and the CI workflow, maybe with an environment variable ?

Comment on lines +73 to +80
server = createQuicSocket({
endpoint: { port: options.quic.port || 8885 }, // default port 8885 if not mentioned in options
server: {
key: options.quic.key,
cert: options.quic.cert,
alpn: options.quic.alpn || 'mqtt'
}
})
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When i look at the Node15 API doc, there are a lot more options available, why did you ignore them ?

@@ -26,6 +26,7 @@ export interface ServerFactoryOptions {
http2?: Http2ServerOptions;
tls?: TlsOptions;
tcp?: { allowHalfOpen?: boolean; pauseOnConnect?: boolean };
quic?:{ port?: number; key: ArrayBuffer; cert: ArrayBuffer; alpn: string};
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you sure, only ArrayBuffer is allowed for key and cert ?

@robertsLando
Copy link
Member

About tests I would check node major using process.version and run tests only on nodejs > 15

Copy link

@mcollina mcollina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm -1 to add this. The QUIC implementation is coming back to Node.js in the next month or so, let's wait for it.

@robertsLando
Copy link
Member

@mcollina Is there any problem if we allow it only on allowed nodejs versions?

@mcollina
Copy link

mcollina commented Jul 2, 2021

There are no nodejs binaries with quic enabled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants