| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1049,17 +1049,16 @@ ngtcp2_ssize write_pkt(ngtcp2_conn *conn, ngtcp2_path *path, | |||
| 1049 | 1049 | ngtcp2_ssize Client::write_pkt(ngtcp2_path *path, ngtcp2_pkt_info *pi, | |
| 1050 | 1050 | uint8_t *dest, size_t destlen, | |
| 1051 | 1051 | ngtcp2_tstamp ts) { | |
| 1052 | - std::array<SharedVec, 16> vec; | ||
| 1052 | + std::array<nghttp3_vec, 16> vec; | ||
| 1053 | 1053 | ||
| 1054 | 1054 | for (;;) { | |
| 1055 | 1055 | int64_t stream_id = -1; | |
| 1056 | 1056 | int fin = 0; | |
| 1057 | 1057 | nghttp3_ssize sveccnt = 0; | |
| 1058 | 1058 | ||
| 1059 | 1059 | if (httpconn_ && ngtcp2_conn_get_max_data_left(conn_)) { | |
| 1060 | - sveccnt = nghttp3_conn_writev_stream( | ||
| 1061 | - httpconn_, &stream_id, &fin, | ||
| 1062 | - reinterpret_cast<nghttp3_vec *>(vec.data()), vec.size()); | ||
| 1060 | + sveccnt = nghttp3_conn_writev_stream(httpconn_, &stream_id, &fin, | ||
| 1061 | + vec.data(), vec.size()); | ||
| 1063 | 1062 | if (sveccnt < 0) { | |
| 1064 | 1063 | std::cerr << "nghttp3_conn_writev_stream: " | |
| 1065 | 1064 | << nghttp3_strerror(static_cast<int>(sveccnt)) << std::endl; | |
@@ -1072,6 +1071,7 @@ ngtcp2_ssize Client::write_pkt(ngtcp2_path *path, ngtcp2_pkt_info *pi, | |||
| 1072 | 1071 | } | |
| 1073 | 1072 | ||
| 1074 | 1073 | ngtcp2_ssize ndatalen; | |
| 1074 | + auto v = vec.data(); | ||
| 1075 | 1075 | auto vcnt = static_cast<size_t>(sveccnt); | |
| 1076 | 1076 | ||
| 1077 | 1077 | uint32_t flags = NGTCP2_WRITE_STREAM_FLAG_MORE; | |
@@ -1081,7 +1081,7 @@ ngtcp2_ssize Client::write_pkt(ngtcp2_path *path, ngtcp2_pkt_info *pi, | |||
| 1081 | 1081 | ||
| 1082 | 1082 | auto nwrite = ngtcp2_conn_writev_stream( | |
| 1083 | 1083 | conn_, path, pi, dest, destlen, &ndatalen, flags, stream_id, | |
| 1084 | - reinterpret_cast<const ngtcp2_vec *>(vec.data()), vcnt, ts); | ||
| 1084 | + reinterpret_cast<const ngtcp2_vec *>(v), vcnt, ts); | ||
| 1085 | 1085 | if (nwrite < 0) { | |
| 1086 | 1086 | switch (nwrite) { | |
| 1087 | 1087 | case NGTCP2_ERR_STREAM_DATA_BLOCKED: | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1652,17 +1652,16 @@ ngtcp2_ssize write_pkt(ngtcp2_conn *conn, ngtcp2_path *path, | |||
| 1652 | 1652 | ngtcp2_ssize Handler::write_pkt(ngtcp2_path *path, ngtcp2_pkt_info *pi, | |
| 1653 | 1653 | uint8_t *dest, size_t destlen, | |
| 1654 | 1654 | ngtcp2_tstamp ts) { | |
| 1655 | - std::array<SharedVec, 16> vec; | ||
| 1655 | + std::array<nghttp3_vec, 16> vec; | ||
| 1656 | 1656 | ||
| 1657 | 1657 | for (;;) { | |
| 1658 | 1658 | int64_t stream_id = -1; | |
| 1659 | 1659 | int fin = 0; | |
| 1660 | 1660 | nghttp3_ssize sveccnt = 0; | |
| 1661 | 1661 | ||
| 1662 | 1662 | if (httpconn_ && ngtcp2_conn_get_max_data_left(conn_)) { | |
| 1663 | - sveccnt = nghttp3_conn_writev_stream( | ||
| 1664 | - httpconn_, &stream_id, &fin, | ||
| 1665 | - reinterpret_cast<nghttp3_vec *>(vec.data()), vec.size()); | ||
| 1663 | + sveccnt = nghttp3_conn_writev_stream(httpconn_, &stream_id, &fin, | ||
| 1664 | + vec.data(), vec.size()); | ||
| 1666 | 1665 | if (sveccnt < 0) { | |
| 1667 | 1666 | std::cerr << "nghttp3_conn_writev_stream: " | |
| 1668 | 1667 | << nghttp3_strerror(static_cast<int>(sveccnt)) << std::endl; | |
@@ -1675,6 +1674,7 @@ ngtcp2_ssize Handler::write_pkt(ngtcp2_path *path, ngtcp2_pkt_info *pi, | |||
| 1675 | 1674 | } | |
| 1676 | 1675 | ||
| 1677 | 1676 | ngtcp2_ssize ndatalen; | |
| 1677 | + auto v = vec.data(); | ||
| 1678 | 1678 | auto vcnt = static_cast<size_t>(sveccnt); | |
| 1679 | 1679 | ||
| 1680 | 1680 | uint32_t flags = | |
@@ -1685,7 +1685,7 @@ ngtcp2_ssize Handler::write_pkt(ngtcp2_path *path, ngtcp2_pkt_info *pi, | |||
| 1685 | 1685 | ||
| 1686 | 1686 | auto nwrite = ngtcp2_conn_writev_stream( | |
| 1687 | 1687 | conn_, path, pi, dest, destlen, &ndatalen, flags, stream_id, | |
| 1688 | - reinterpret_cast<const ngtcp2_vec *>(vec.data()), vcnt, ts); | ||
| 1688 | + reinterpret_cast<const ngtcp2_vec *>(v), vcnt, ts); | ||
| 1689 | 1689 | if (nwrite < 0) { | |
| 1690 | 1690 | switch (nwrite) { | |
| 1691 | 1691 | case NGTCP2_ERR_STREAM_DATA_BLOCKED: | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -34,7 +34,6 @@ | |||
| 34 | 34 | #include <span> | |
| 35 | 35 | ||
| 36 | 36 | #include <ngtcp2/ngtcp2.h> | |
| 37 | - #include <nghttp3/nghttp3.h> | ||
| 38 | 37 | ||
| 39 | 38 | #include "network.h" | |
| 40 | 39 | ||
@@ -64,11 +63,6 @@ inline constexpr uint32_t TLS_ALERT_ECH_REQUIRED = 121; | |||
| 64 | 63 | ||
| 65 | 64 | inline constexpr size_t MAX_RECV_PKTS = 64; | |
| 66 | 65 | ||
| 67 | - union SharedVec { | ||
| 68 | - ngtcp2_vec v2; | ||
| 69 | - nghttp3_vec v3; | ||
| 70 | - }; | ||
| 71 | - | ||
| 72 | 66 | // msghdr_get_ecn gets ECN bits from |msg|. |family| is the address | |
| 73 | 67 | // family from which packet is received. | |
| 74 | 68 | uint8_t msghdr_get_ecn(msghdr *msg, int family); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1281,7 +1281,7 @@ typedef struct ngtcp2_sockaddr_in { | |||
| 1281 | 1281 | } ngtcp2_sockaddr_in; | |
| 1282 | 1282 | ||
| 1283 | 1283 | typedef struct ngtcp2_in6_addr { | |
| 1284 | - uint8_t in6_addr[16]; | ||
| 1284 | + uint8_t s6_addr[16]; | ||
| 1285 | 1285 | } ngtcp2_in6_addr; | |
| 1286 | 1286 | ||
| 1287 | 1287 | typedef struct ngtcp2_sockaddr_in6 { | |
@@ -1866,8 +1866,8 @@ typedef struct ngtcp2_settings { | |||
| 1866 | 1866 | uint64_t max_stream_window; | |
| 1867 | 1867 | /** | |
| 1868 | 1868 | * :member:`ack_thresh` is the minimum number of the received ACK | |
| 1869 | - * eliciting packets that trigger the immediate acknowledgement from | ||
| 1870 | - * the local endpoint. | ||
| 1869 | + * eliciting packets that triggers the immediate acknowledgement | ||
| 1870 | + * from the local endpoint. | ||
| 1871 | 1871 | */ | |
| 1872 | 1872 | size_t ack_thresh; | |
| 1873 | 1873 | /** | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -36,7 +36,7 @@ | |||
| 36 | 36 | * | |
| 37 | 37 | * Version number of the ngtcp2 library release. | |
| 38 | 38 | */ | |
| 39 | - #define NGTCP2_VERSION "1.20.0" | ||
| 39 | + #define NGTCP2_VERSION "1.21.0" | ||
| 40 | 40 | ||
| 41 | 41 | /** | |
| 42 | 42 | * @macro | |
@@ -46,6 +46,6 @@ | |||
| 46 | 46 | * number, 8 bits for minor and 8 bits for patch. Version 1.2.3 | |
| 47 | 47 | * becomes 0x010203. | |
| 48 | 48 | */ | |
| 49 | - #define NGTCP2_VERSION_NUM 0x011400 | ||
| 49 | + #define NGTCP2_VERSION_NUM 0x011500 | ||
| 50 | 50 | ||
| 51 | 51 | #endif /* !defined(NGTCP2_VERSION_H) */ | |
| Back | FazBrowse Home | New Git URL |
0 commit comments