Skip to content
This repository has been archived by the owner on Aug 11, 2020. It is now read-only.

Commit

Permalink
quic: fixup after rebase from nodejs/node master
Browse files Browse the repository at this point in the history
  • Loading branch information
jasnell committed Feb 3, 2020
1 parent 158fe1d commit 7ba53ab
Show file tree
Hide file tree
Showing 16 changed files with 80 additions and 35 deletions.
73 changes: 55 additions & 18 deletions doc/api/errors.md
Original file line number Diff line number Diff line change
Expand Up @@ -1641,91 +1641,128 @@ A non-context-aware native addon was loaded in a process that disallows them.
A given value is out of the accepted range.

<a id="ERR_QUIC_CANNOT_SET_GROUPS"></a>
### ERR_QUIC_CANNOT_SET_GROUPS
### `ERR_QUIC_CANNOT_SET_GROUPS`

> Stability: 1 - Experimental
TBD

<a id="ERR_QUIC_ERROR"></a>
### ERR_QUIC_ERROR
### `ERR_QUIC_ERROR`

> Stability: 1 - Experimental
TBD

<a id="ERR_QUIC_TLS13_REQUIRED"></a>
### ERR_QUIC_TLS13_REQUIRED
### `ERR_QUIC_TLS13_REQUIRED`

> Stability: 1 - Experimental
TBD

<a id="ERR_QUICCLIENTSESSION_FAILED"></a>
### ERR_QUICCLIENTSESSION_FAILED
### `ERR_QUICCLIENTSESSION_FAILED`

> Stability: 1 - Experimental
TBD

<a id="ERR_QUICCLIENTSESSION_FAILED_SETSOCKET"></a>
### ERR_QUICCLIENTSESSION_FAILED_SETSOCKET
### `ERR_QUICCLIENTSESSION_FAILED_SETSOCKET`

> Stability: 1 - Experimental
TBD

<a id="ERR_QUICSESSION_DESTROYED"></a>
### ERR_QUICSESSION_DESTROYED
### `ERR_QUICSESSION_DESTROYED`

> Stability: 1 - Experimental
TBD

<a id="ERR_QUICSESSION_INVALID_DCID"></a>
### ERR_QUICSESSION_INVALID_DCID
### `ERR_QUICSESSION_INVALID_DCID`

> Stability: 1 - Experimental
TBD

<a id="ERR_QUICSESSION_UPDATEKEY"></a>
### ERR_QUICSESSION_UPDATEKEY
### `ERR_QUICSESSION_UPDATEKEY`

> Stability: 1 - Experimental
TBD

<a id="ERR_QUICSESSION_VERSION_NEGOTIATION"></a>
### ERR_QUICSESSION_VERSION_NEGOTIATION
### `ERR_QUICSESSION_VERSION_NEGOTIATION`

> Stability: 1 - Experimental
TBD

<a id="ERR_QUICSOCKET_CLOSING"></a>
### ERR_QUICSOCKET_CLOSING
### `ERR_QUICSOCKET_CLOSING`

> Stability: 1 - Experimental
TBD

<a id="ERR_QUICSOCKET_DESTROYED"></a>
### ERR_QUICSOCKET_DESTROYED
### `ERR_QUICSOCKET_DESTROYED`

> Stability: 1 - Experimental
TBD

<a id="ERR_QUICSOCKET_INVALID_STATELESS_RESET_SECRET_LENGTH"></a>
### ERR_QUICSOCKET_INVALID_STATELESS_RESET_SECRET_LENGTH
### `ERR_QUICSOCKET_INVALID_STATELESS_RESET_SECRET_LENGTH`

> Stability: 1 - Experimental
TBD

<a id="ERR_QUICSOCKET_LISTENING"></a>
### ERR_QUICSOCKET_LISTENING
### `ERR_QUICSOCKET_LISTENING`

> Stability: 1 - Experimental
TBD

<a id="ERR_QUICSOCKET_UNBOUND"></a>
### ERR_QUICSOCKET_UNBOUND
### `ERR_QUICSOCKET_UNBOUND`

> Stability: 1 - Experimental
TBD

<a id="ERR_QUICSTREAM_DESTROYED"></a>
### ERR_QUICSTREAM_DESTROYED
### `ERR_QUICSTREAM_DESTROYED`

> Stability: 1 - Experimental
TBD

<a id="ERR_QUICSTREAM_INVALID_PUSH"></a>
### ERR_QUICSTREAM_INVALID_PUSH
### `ERR_QUICSTREAM_INVALID_PUSH`

> Stability: 1 - Experimental
TBD

<a id="ERR_QUICSTREAM_OPEN_FAILED"></a>
### ERR_QUICSTREAM_OPEN_FAILED
### `ERR_QUICSTREAM_OPEN_FAILED`

> Stability: 1 - Experimental
TBD

<a id="ERR_QUICSTREAM_UNSUPPORTED_PUSH"></a>
### ERR_QUICSTREAM_UNSUPPORTED_PUSH
### `ERR_QUICSTREAM_UNSUPPORTED_PUSH`

> Stability: 1 - Experimental
TBD

Expand Down
6 changes: 3 additions & 3 deletions doc/api/quic.md
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ added: REPLACEME
using `quicsocket.connect()`.
* `endpoint` {Object} An object describing the local address to bind to.
* `address` {string} The local address to bind to. This may be an IPv4 or
IPv6 address or a hostname. If a hostname is given, it will be resolved
IPv6 address or a host name. If a host name is given, it will be resolved
to an IP address.
* `port` {number} The local port to bind to.
* `type` {string} Either `'udp4'` or `'upd6'` to use either IPv4 or IPv6,
Expand Down Expand Up @@ -1134,7 +1134,7 @@ is updated to use the server-advertised preferred address. The callback is
invoked with a single `address` argument:

* `address` {Object}
* `address` {string} The preferred hostname
* `address` {string} The preferred host name
* `port` {number} The preferred IP port
* `type` {string} Either `'udp4'` or `'udp6'`.

Expand Down Expand Up @@ -1285,7 +1285,7 @@ added: REPLACEME

* `options`: {Object} An object describing the local address to bind to.
* `address` {string} The local address to bind to. This may be an IPv4 or
IPv6 address or a hostname. If a hostname is given, it will be resolved
IPv6 address or a host name. If a host name is given, it will be resolved
to an IP address.
* `port` {number} The local port to bind to.
* `type` {string} Either `'udp4'` or `'upd6'` to use either IPv4 or IPv6,
Expand Down
2 changes: 1 addition & 1 deletion lib/internal/histogram.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const {
} = require('internal/util');

const { format } = require('util');
const { Symbol } = primordials;
const { Map, Symbol } = primordials;

const kHandle = Symbol('kHandle');
const kDestroy = Symbol('kDestroy');
Expand Down
11 changes: 10 additions & 1 deletion lib/internal/quic/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,16 @@ const {

assertCrypto();

const { Symbol, Array } = primordials;
const {
Array,
BigInt64Array,
Boolean,
Error,
Map,
RegExp,
Set,
Symbol,
} = primordials;

const { Buffer } = require('buffer');
const { isArrayBufferView } = require('internal/util/types');
Expand Down
2 changes: 1 addition & 1 deletion src/quic/node_quic.cc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "debug_utils.h"
#include "debug_utils-inl.h"
#include "node.h"
#include "env-inl.h"
#include "node_crypto.h" // SecureContext
Expand Down
2 changes: 1 addition & 1 deletion src/quic/node_quic_default_application.cc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "debug_utils.h"
#include "debug_utils-inl.h"
#include "node_quic_buffer-inl.h"
#include "node_quic_default_application.h"
#include "node_quic_session-inl.h"
Expand Down
2 changes: 1 addition & 1 deletion src/quic/node_quic_http3_application.cc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "node.h"
#include "debug_utils.h"
#include "debug_utils-inl.h"
#include "node_mem-inl.h"
#include "node_quic_buffer-inl.h"
#include "node_quic_http3_application.h"
Expand Down
2 changes: 1 addition & 1 deletion src/quic/node_quic_session-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS

#include "debug_utils.h"
#include "debug_utils-inl.h"
#include "node_crypto.h"
#include "node_crypto_common.h"
#include "node_quic_crypto.h"
Expand Down
2 changes: 1 addition & 1 deletion src/quic/node_quic_session.cc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "node_quic_session-inl.h" // NOLINT(build/include)
#include "aliased_buffer.h"
#include "debug_utils.h"
#include "debug_utils-inl.h"
#include "env-inl.h"
#include "node_crypto_common.h"
#include "ngtcp2/ngtcp2.h"
Expand Down
2 changes: 1 addition & 1 deletion src/quic/node_quic_socket-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include "node_sockaddr.h"
#include "node_quic_session.h"
#include "node_crypto.h"
#include "debug_utils.h"
#include "debug_utils-inl.h"

namespace node {

Expand Down
2 changes: 1 addition & 1 deletion src/quic/node_quic_socket.cc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "node_quic_socket-inl.h" // NOLINT(build/include)
#include "async_wrap-inl.h"
#include "debug_utils.h"
#include "debug_utils-inl.h"
#include "env-inl.h"
#include "memory_tracker-inl.h"
#include "nghttp2/nghttp2.h"
Expand Down
2 changes: 1 addition & 1 deletion src/quic/node_quic_stream-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS

#include "debug_utils.h"
#include "debug_utils-inl.h"
#include "node_quic_session.h"
#include "node_quic_stream.h"
#include "node_quic_buffer-inl.h"
Expand Down
2 changes: 1 addition & 1 deletion src/quic/node_quic_stream.cc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "node_quic_stream-inl.h" // NOLINT(build/include)
#include "async_wrap-inl.h"
#include "debug_utils.h"
#include "debug_utils-inl.h"
#include "env-inl.h"
#include "node.h"
#include "node_buffer.h"
Expand Down
2 changes: 1 addition & 1 deletion src/quic/node_quic_util-inl.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifndef SRC_QUIC_NODE_QUIC_UTIL_INL_H_
#define SRC_QUIC_NODE_QUIC_UTIL_INL_H_

#include "debug_utils.h"
#include "debug_utils-inl.h"
#include "node_internals.h"
#include "node_quic_crypto.h"
#include "node_quic_util.h"
Expand Down
1 change: 0 additions & 1 deletion test/common/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -687,7 +687,6 @@ module.exports = {
hasIntl,
hasCrypto,
hasQuic,
hasIPv6,
hasMultiLocalhost,
invalidArgTypeHelper,
isAIX,
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-quic-client-server.js
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ server.on('ready', common.mustCall(() => {
debug('QuicClientSession server is %sauthenticated',
req.authenticated ? '' : 'not ');
assert(!req.authenticated);
common.expectsError(() => { throw req.authenticationError; }, {
assert.throws(() => { throw req.authenticationError; }, {
code: 'ERR_QUIC_VERIFY_HOSTNAME_MISMATCH',
message: 'Hostname mismatch'
});
Expand Down

0 comments on commit 7ba53ab

Please sign in to comment.