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

Commit

Permalink
quic: address multiple nits
Browse files Browse the repository at this point in the history
  • Loading branch information
jasnell committed Dec 4, 2019
1 parent 7164f3b commit 58a1cd2
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 12 deletions.
16 changes: 8 additions & 8 deletions doc/api/quic.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ socket.on('listening', () => {

## QUIC Basics

QUIC is a UDP-based network transport protocol that includes built in security
QUIC is a UDP-based network transport protocol that includes built-in security
via TLS 1.3, flow control, error correction, connection migration,
multiplexing, and more.

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

* Type: {BigInt}

A `BigInt` representing the number of retranmissions caused by delayed
A `BigInt` representing the number of retransmissions caused by delayed
acknowledgements.

#### quicsession.address
Expand Down Expand Up @@ -448,7 +448,7 @@ added: REPLACEME

* Type: {number}

The total number of unacknoledged bytes this QUIC endpoint has tramitted
The total number of unacknowledged bytes this QUIC endpoint has transmitted
to the connected peer.

#### quicsession.bytesReceived
Expand Down Expand Up @@ -630,7 +630,7 @@ added: REPLACEME

* Type: {BigInt}

A `BigInt` representing the number of lost-packet retranmissions that have been
A `BigInt` representing the number of lost-packet retransmissions that have been
performed on this `QuicSession`.

#### quicsession.maxDataLeft
Expand All @@ -650,7 +650,7 @@ added: REPLACEME

* Type: {BigInt}

A `BigInt` representing the maximum number of in flight bytes recorded
A `BigInt` representing the maximum number of in-flight bytes recorded
for this `QuicSession`.

#### quicsession.maxStreams
Expand Down Expand Up @@ -711,7 +711,7 @@ added: REPLACEME

* Type: {BigInt}

A `BigInt` representing the total number of `QuicStreams` initated by the
A `BigInt` representing the total number of `QuicStreams` initiated by the
connected peer.

#### quicsession.remoteAddress
Expand Down Expand Up @@ -928,7 +928,7 @@ added: REPLACEME
-->

* `servername` {String} A DNS name to associate with the given context.
* `context` {Object} A TLS SecureContext to associate with the `servername`.
* `context` {tls.SecureContext} A TLS SecureContext to associate with the `servername`.

TBD

Expand Down Expand Up @@ -1604,7 +1604,7 @@ added: REPLACEME
-->
* Type: {boolean}

True if dataflow on the `QuicStream` was prematured terminated.
True if dataflow on the `QuicStream` was prematurely terminated.

#### quicstream.bidirectional
<!--YAML
Expand Down
2 changes: 1 addition & 1 deletion src/node_quic_session.cc
Original file line number Diff line number Diff line change
Expand Up @@ -590,7 +590,7 @@ void JSQuicSessionListener::OnSessionTicket(int size, SSL_SESSION* session) {

AllocatedBuffer session_ticket = env->AllocateManaged(size);
unsigned char* session_data =
reinterpret_cast<unsigned char*>(session_ticket.data());
reinterpret_cast<unsigned char*>(session_ticket.data());
memset(session_data, 0, size);
i2d_SSL_SESSION(session, &session_data);
if (!session_ticket.empty())
Expand Down
4 changes: 3 additions & 1 deletion src/node_quic_session.h
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,9 @@ enum QuicSessionStatsIdx : int {
IDX_QUIC_SESSION_STATS_RETRY_COUNT,
IDX_QUIC_SESSION_STATS_LOSS_RETRANSMIT_COUNT,
IDX_QUIC_SESSION_STATS_ACK_DELAY_RETRANSMIT_COUNT,
IDX_QUIC_SESSION_STATS_PATH_VALIDATION_SUCCESS_COUNT,IDX_QUIC_SESSION_STATS_PATH_VALIDATION_FAILURE_COUNT,IDX_QUIC_SESSION_STATS_MAX_BYTES_IN_FLIGHT
IDX_QUIC_SESSION_STATS_PATH_VALIDATION_SUCCESS_COUNT,
IDX_QUIC_SESSION_STATS_PATH_VALIDATION_FAILURE_COUNT,
IDX_QUIC_SESSION_STATS_MAX_BYTES_IN_FLIGHT
};

class QuicSessionListener {
Expand Down
4 changes: 2 additions & 2 deletions src/node_sockaddr-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -132,12 +132,12 @@ SocketAddress::SocketAddress(const SocketAddress& addr) {
memcpy(&address_, &addr.address_, addr.GetLength());
}

inline SocketAddress& SocketAddress::operator=(const sockaddr* addr) {
SocketAddress& SocketAddress::operator=(const sockaddr* addr) {
memcpy(&address_, addr, GetLength(addr));
return *this;
}

inline SocketAddress& SocketAddress::operator=(const SocketAddress& addr) {
SocketAddress& SocketAddress::operator=(const SocketAddress& addr) {
memcpy(&address_, &addr.address_, addr.GetLength());
}

Expand Down

0 comments on commit 58a1cd2

Please sign in to comment.