Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
1331 commits
Select commit Hold shift + click to select a range
836c2f8
refactor: add Socks4 proxy and not completed http proxy
imz87 Mar 5, 2025
0636927
refactor: add Socks4 proxy and not completed http proxy
imz87 Mar 5, 2025
1f71b1c
refactor: add a general Http3ControlStreamChannelHandler
imz87 Mar 12, 2025
b51a0f3
refactor: build net socket for http proxy
imz87 Mar 12, 2025
9c9c006
refactor: prepare netty HttpProxyHandler for httpProxy
imz87 Mar 12, 2025
330ead3
refactor: add proxy handler
imz87 Mar 12, 2025
e9aebda
refactor: add http proxy handler test
imz87 Mar 12, 2025
036929c
refactor: remove unused method
imz87 Mar 12, 2025
041a601
refactor: use authority instead of uri
imz87 Mar 12, 2025
4e8f9ce
refactor: add todo
imz87 Mar 12, 2025
dd53a26
refactor: resolve a test issue
imz87 Mar 12, 2025
ee7aeb9
Handle correctly future await from an execute blocking on a virtual t…
vietj Mar 3, 2025
a07022d
HTTP/2 client queued writes should fail when stream creation fails.
vietj Mar 4, 2025
98c316b
AddressResolver now declares a type parameter bound to Address for mo…
vietj Mar 8, 2025
0b2bdc2
Internal API cleanup.
vietj Mar 7, 2025
68894bd
Mitigate the usage of NoStackTraceThrowable.
vietj Mar 7, 2025
fee9eb4
Remove un-necessary module-info test requires
vietj Mar 10, 2025
16425ef
Expose the deployment manager internal API.
vietj Mar 10, 2025
3eb2bc0
Remove spurious import of org.apache.commons.math3.analysis
vietj Mar 11, 2025
dc031ea
Fix NPE when handling of HTTP/2 upgrade on server with a malformed ho…
vietj Mar 11, 2025
657a018
Make sure ContextBuilder defaults to EL threading model (#5516)
tsegismont Mar 11, 2025
41705f8
refactor: resolve merge conflicts with master
imz87 Mar 14, 2025
3e8e9e1
refactor: add import
imz87 Mar 14, 2025
d251cd6
refactor: resolve merge conflicts with master
imz87 Mar 14, 2025
e6bf71a
refactor: resolve rebase conflicts with master
imz87 Mar 14, 2025
50f8f79
refactor: resolve rebase conflicts with master
imz87 Mar 14, 2025
2b489d2
refactor: resolve rebase conflicts with master
imz87 Mar 14, 2025
9e39af2
refactor: clean the proxyProvider class
imz87 Mar 16, 2025
027b2ff
refactor: clean the proxyProvider class
imz87 Mar 16, 2025
1b4e752
refactor: use parent class log variable
imz87 Mar 16, 2025
e44d835
refactor: clean the proxyProvider class
imz87 Mar 16, 2025
6aa2856
refactor: clean the proxyProvider class
imz87 Mar 16, 2025
50f14df
refactor: cannot use an HTTP proxy without modifying Netty
imz87 Mar 17, 2025
af131fc
refactor: alter netty copy classes to align with originals for easier…
imz87 Mar 17, 2025
c8973aa
refactor: correct proxy tests
imz87 Mar 17, 2025
ec08162
refactor: use isDebug only in parent class
imz87 Apr 1, 2025
c4f2fba
refactor: move proxy startup to base class
imz87 Apr 1, 2025
0601bba
refactor: use as alternative
imz87 Apr 1, 2025
e1f87a2
refactor: use proper name
imz87 Apr 1, 2025
be0df8a
refactor: use proper name
imz87 Apr 1, 2025
c768f77
refactor: add a single createHAProxy for managing better
imz87 Apr 1, 2025
bb8aad1
refactor: improve readability
imz87 Apr 1, 2025
0f8f412
refactor: add connect timeout to handle debug and other conditions
imz87 Apr 1, 2025
0367be0
refactor: use proxy connect timeout to system
imz87 Apr 1, 2025
0e31db5
refactor: solve issue where hostAddress was null in some cases
imz87 Apr 1, 2025
b058787
refactor: resolve some test issues
imz87 Apr 1, 2025
22899e7
refactor: resolve some test issues
imz87 Apr 1, 2025
bece120
refactor: resolve some test issues
imz87 Apr 1, 2025
bc632ea
refactor: reduce code changes in netty for earlier merge
imz87 Apr 3, 2025
c2eec21
refactor: use http3Utils
imz87 Apr 6, 2025
3057911
refactor: make similar to netty
imz87 Apr 7, 2025
eab448e
refactor: make similar to netty
imz87 Apr 7, 2025
dd5d391
refactor: clarify the code
imz87 Apr 7, 2025
822851a
refactor: remove some unnecessary tests
imz87 Apr 14, 2025
ea5a3c8
refactor: ignore haProxy tests for http3
imz87 Apr 14, 2025
a6dda57
refactor: ignore haProxy tests for http3
imz87 Apr 14, 2025
f07634d
refactor: changed because access modifier of `setCodec` was set to pr…
imz87 Apr 14, 2025
9bb2e1a
refactor: changed because access modifier of `setCodec` was set to pr…
imz87 Apr 14, 2025
e6f4874
refactor: generalize and move priority tests to parent to be utilized…
imz87 Apr 15, 2025
9e2dadc
refactor: add random positive integer generator
imz87 Apr 15, 2025
46ea9dc
refactor: generalize and move priority tests to parent to be utilized…
imz87 Apr 15, 2025
bf9caf2
refactor: changed because access modifier of `setCodec` was set to pr…
imz87 Apr 15, 2025
db23043
refactor: remove because they have no issue
imz87 Apr 15, 2025
41bab9a
refactor: add @Test for ignored test cases
imz87 Apr 15, 2025
72f2893
refactor: set bound for weight because it has to be lower than 255
imz87 Apr 15, 2025
80e730b
refactor: avoid setting null destination
imz87 Apr 26, 2025
b189ff5
refactor: align http3ServerResponse.netSocket() with http2ServerResponse
imz87 Apr 26, 2025
2329ade
refactor: prepare HttpClientTest for Http3ClientTest
imz87 Apr 27, 2025
6139b9c
refactor: prepare HttpClientTest for Http3ClientTest
imz87 Apr 27, 2025
55381ee
refactor: add a simple log
imz87 Apr 28, 2025
9e17867
refactor: move "receive settings only once" logic to control handler
imz87 Apr 28, 2025
bf32f33
refactor: expose SettingsFrameHandler and GoAwayFrameHandler instead …
imz87 Apr 28, 2025
fcac709
feat: add http3Client test
imz87 Apr 28, 2025
b3ac34f
feat: add log
imz87 Apr 29, 2025
a5330cb
feat: add http3 createServerForClientResetServerStream
imz87 Apr 29, 2025
73f5f11
feat: make promise from channel
imz87 Apr 29, 2025
b2a2620
refactor: improve readability
imz87 Apr 29, 2025
046ba51
refactor: move common things to parent builder
imz87 Apr 29, 2025
0e38842
fix: ensure promise is completed consistently for all cases
imz87 Apr 29, 2025
4b99707
fix: resolve test issues related to ON_SHUTDOWN
imz87 May 1, 2025
eaf9558
fix: reformat
imz87 May 1, 2025
01c5a39
fix: add QuicStreamChannel.SHUTDOWN_OUTPUT on last frame regardless o…
imz87 May 1, 2025
921d7c8
test: ignore WINDOW_UPDATE tests for HTTP/3
imz87 May 1, 2025
96738e1
test: ignore not applicable in HTTP/3 tests
imz87 May 1, 2025
5c1e50a
test: ignore temporary
imz87 May 1, 2025
c005d9f
test: throw exception instead of using abstract method in parent class
imz87 May 4, 2025
f5e409c
test: ignore priority tests
imz87 May 5, 2025
c26c245
test: make unified priority for h2 and h3
imz87 May 5, 2025
c6d1f13
fix: throw connectException like http2 instead of PortUnreachableExce…
imz87 May 5, 2025
f3f0777
fix: remove streamResetHandler
imz87 May 6, 2025
97beaf3
feat: add capability to write unknown frames in HTTP/3
imz87 May 6, 2025
093b62d
fix: use correct logger
imz87 May 6, 2025
353c844
fix: streamId starts from 0 for http3
imz87 May 6, 2025
10078e8
fix: streamId starts from 0 for http3
imz87 May 6, 2025
2932e31
fix: resolve writeReset issue when the stream is closed
imz87 May 14, 2025
9e9c348
fix: correct some more tests
imz87 May 14, 2025
a589273
fix: configure datagarmChannel on creation
imz87 May 14, 2025
97da32f
fix: extend ChannelDuplexHandler to use close method
imz87 May 14, 2025
ab481d5
fix: manage close operations
imz87 May 14, 2025
30975b3
fix: manage close operations
imz87 May 14, 2025
e9e51ee
fix: resolve the next test case
imz87 May 15, 2025
d26598f
fix: resolve the next test case
imz87 May 15, 2025
0defb02
fix: resolve the next test case
imz87 May 15, 2025
1c59145
fix: resolve the next test case
imz87 May 15, 2025
367da31
fix: resolve the next test cases
imz87 May 17, 2025
d10e792
refactor: extract H3ServerBuilder for readability
imz87 May 17, 2025
f6d8092
fix: resolve test
imz87 May 17, 2025
b60ec92
fix: ignore ping test because PING handling is not needed in HTTP/3
imz87 May 17, 2025
8dba225
fix: assert correctly on each http version
imz87 May 17, 2025
fb97f1f
fix: assert correctly on each http version
imz87 May 17, 2025
efd8de6
fix: assert correctly on each http version
imz87 May 17, 2025
f471495
fix: prepare testConnectionDecodeError for h3
imz87 May 17, 2025
89cf410
fix: remove settings tests because they are not exchanged during the …
imz87 May 17, 2025
aaa037f
refactor: order methods
imz87 May 17, 2025
53a2b92
fix: use zero as reset code for http3
imz87 May 17, 2025
429f569
fix: use zero as reset code for http3
imz87 May 17, 2025
9a3495a
fix: resolve max concurrent stream count issue
imz87 May 17, 2025
e26ab1c
fix: resolve the next test cases
imz87 May 18, 2025
b67859c
fix: add a stream flow control mechanism to manage stream max sent bytes
imz87 May 21, 2025
89577c2
fix: use separate Vert.x instances
imz87 May 21, 2025
1b2b328
fix: resolve by adding a stream flow control mechanism to manage stre…
imz87 May 21, 2025
cb9728e
fix: use the local channel param
imz87 May 29, 2025
6242d8f
fix: resolved merge conflicts with master
imz87 May 29, 2025
ac51c3f
fix: resolved merge conflicts with master
imz87 May 29, 2025
d0d1a31
fix: make more readable
imz87 May 29, 2025
d3a9ee1
fix: make a single method to eval writability
imz87 May 29, 2025
c5df2de
fix: use not ssl for http2
imz87 Jun 2, 2025
121acf2
fix: resolve test issue
imz87 Jun 2, 2025
b211de2
fix: resolve Http2NetTest.testTLSClientCertRequiredNoClientCert1_3 te…
imz87 Jun 2, 2025
8f08ea7
fix: resolve Http2NetTest.testTLSClientCertRequiredNoClientCert1_3 te…
imz87 Jun 2, 2025
76a6323
fix: resolve Http2NetTest.testTLSClientCertRequiredNoClientCert1_3 te…
imz87 Jun 2, 2025
c972015
fix: resolve tests issues
imz87 Jun 2, 2025
f55dbb6
fix: resolve test case testNetClientInternalTLSWithSuppliedSSLContext
imz87 Jun 2, 2025
50fc27d
fix: resolve test case testNetClientInternalTLSWithSuppliedSSLContext
imz87 Jun 2, 2025
226108d
fix: resolve test case testNetClientInternalTLSWithSuppliedSSLContext
imz87 Jun 2, 2025
20981dd
fix: resolve test case testNetClientInternalTLSWithSuppliedSSLContext
imz87 Jun 2, 2025
75e2a27
fix: resolve Http1xProxyTest issue
imz87 Jun 3, 2025
b755ce4
feat: set TrafficShapingHandler on stream channel in HTTP/3
imz87 Jun 3, 2025
f659913
fix: resolve http2 test issue
imz87 Jun 3, 2025
c09f008
fix(tests): ensure randConnectTimeout is positive
imz87 Jun 3, 2025
67d159a
fix(tests): ignore HTTP/3 test(testMaxConcurrencyMultipleConnections)…
imz87 Jun 3, 2025
84c4ce3
fix(tests): ignore HTTP/3 proxy tests temporarily
imz87 Jun 3, 2025
e3a5c55
Merge remote-tracking branch 'origin/feature/http3-support-5.x' into …
imz87 Jun 8, 2025
17b2271
fix: resolve rebase issues
imz87 Jun 8, 2025
e83aeaa
refactor: strip formatting noise, focus on logic changes only
imz87 Jun 8, 2025
f9f0185
refactor: remove stream method like master
imz87 Jun 8, 2025
0f38280
refactor: generalize VertxHttpStreamBase for HTTP/2 and HTTP/3
imz87 Jun 8, 2025
a9faf99
feat: add maxLifetime support for HTTP/3 connections
imz87 Jun 8, 2025
9633e3d
refactor: extract shared test logic to common base for HTTP/2 and HTTP/3
imz87 Jun 8, 2025
9067b3c
refactor: set protected like master
imz87 Jun 8, 2025
1960c14
Merge remote-tracking branch 'origin/master' into feature/http3-suppo…
imz87 Jul 10, 2025
8bc3ab1
feat: use new headers
imz87 Jul 10, 2025
e9f8354
feat: use StreamPriorityBase instead of StreamPriority
imz87 Jul 10, 2025
9efbc53
refactor: make HTTP/3 dual of HTTP/2 to enable migration of remaining…
imz87 Jul 10, 2025
a185f85
fix: ignore some tests temporarily
imz87 Jul 10, 2025
5a7705b
fix: resolve merging bugs
imz87 Jul 10, 2025
ab9c57d
fix: resolve merging bugs
imz87 Jul 10, 2025
2830f9d
fix: resolve merging bugs
imz87 Jul 10, 2025
5cdec8d
fix: use new http3 architecture
imz87 Jul 10, 2025
8dff983
fix: set http3
imz87 Jul 10, 2025
1e76b25
feat: combine priority params of http2 and http3
imz87 Jul 10, 2025
4e7546b
feat: combine priority params of http2 and http3
imz87 Jul 10, 2025
969ede4
refactor: remove old HTTP/3 implementation files from io.vertx.core.h…
imz87 Jul 10, 2025
c0de00a
refactor: remove StreamPriority from codegen
imz87 Jul 10, 2025
f8434dc
refactor: remove redundant createDefaultStreamPriority
imz87 Jul 10, 2025
37c00b8
refactor: remove redundant createDefaultStreamPriority
imz87 Jul 10, 2025
333eb06
refactor: remove Http3ClientChannelInitializer
imz87 Jul 12, 2025
77e89bf
refactor: remove Http3HeadersMultiMap
imz87 Jul 12, 2025
6737928
refactor: remove Http3HeadersMultiMap
imz87 Jul 12, 2025
618a944
refactor: relocate old http3 files under http2/quic
imz87 Jul 12, 2025
5081805
refactor: delegate version selection to concrete implementation
imz87 Jul 12, 2025
e488ef7
refactor: reorder methods to match http dual file layout
imz87 Jul 12, 2025
5b4e44b
refactor: use http2MultiplexingLimit for both http2 and quic
imz87 Jul 12, 2025
1d7ebb1
refactor: use http2MultiplexingLimit for both http2 and quic
imz87 Jul 12, 2025
1ea5a00
refactor: change variable names to mirror http2 dual implementation f…
imz87 Jul 12, 2025
69986c4
refactor: reformat
imz87 Jul 12, 2025
c7d818a
refactor: relocate HTTP/3 utilities to Http3Utils class
imz87 Jul 12, 2025
fc9ce19
refactor: store stream channels on activation and clean up on connect…
imz87 Jul 13, 2025
9415649
test: resolve test
imz87 Jul 13, 2025
722c668
refactor: write author
imz87 Jul 13, 2025
09bbdc3
Merge remote-tracking branch 'origin/master' into feature/http3-suppo…
imz87 Jul 16, 2025
bc79e9e
refactor: restructure httpClient tests
imz87 Jul 16, 2025
4eee930
refactor: restructure httpClient tests
imz87 Jul 16, 2025
21d8dd6
refactor: restructure httpClient tests
imz87 Jul 16, 2025
d46623e
refactor: decouple SSLOptions from http3-specific logic
imz87 Jul 16, 2025
b3afed2
Merge remote-tracking branch 'origin/master' into feature/http3-suppo…
imz87 Jul 20, 2025
a970655
refactor: remove HTTP/3 awareness from SSLOptions and related APIs
imz87 Jul 20, 2025
849c5ca
Merge remote-tracking branch 'origin/master' into feature/http3-suppo…
imz87 Jul 22, 2025
0f2be08
fix: resolve after merging with master
imz87 Jul 22, 2025
de85d76
refactor: migrate from incubator-http3 to stable http3 module
imz87 Jul 22, 2025
7269cf8
refactor: move HTTP/3 options to new QuicOptions class
imz87 Jul 22, 2025
11b2d0c
refactor: introduce Http3Settings for protocol-specific configuration
imz87 Jul 23, 2025
3d3c76c
refactor: move utility methods from API to implementation class
imz87 Jul 23, 2025
65a7941
refactor: move utility methods from API to implementation class
imz87 Jul 23, 2025
0221d05
refactor: remove EncodingDetector replaced by CompressionManager
imz87 Jul 23, 2025
918ae54
refactor: eliminate redundant default implementation of goAwayOnConne…
imz87 Jul 23, 2025
e4a2c30
refactor: replace Handler with Completable for async operations
imz87 Jul 23, 2025
9a41506
refactor: rename getReset() to isReset() for clarity
imz87 Jul 23, 2025
f8a7783
refactor: reference Netty PR #14993 in TODO for temporary codes
imz87 Jul 23, 2025
49ebb5e
refactor: improve quic sni handling
imz87 Jul 23, 2025
1782329
refactor: check SSLHandler presence in the pipeline using an alternat…
imz87 Jul 23, 2025
8e730ad
refactor: extract options creation into parent test class for easier …
imz87 Jul 23, 2025
9127036
refactor: ignore new problematic tests
imz87 Jul 23, 2025
c909f80
Merge remote-tracking branch 'origin/master' into feature/http3-suppo…
imz87 Jul 26, 2025
b74e392
fix: validate sslHandshakeTimeout early and refactor QuicOptions hand…
imz87 Jul 26, 2025
f6c4a13
refactor: reorganize http3 and quic packages based on responsibilities
imz87 Jul 27, 2025
249b828
refactor: reorganize http3 and quic packages based on responsibilities
imz87 Jul 27, 2025
3200e6e
refactor: use EnumSet instead of Set for enum collections
imz87 Jul 27, 2025
fcf5516
refactor: remove unnecessary synchronized keyword
imz87 Jul 27, 2025
70641b8
refactor: remove unnecessary vertx method
imz87 Jul 27, 2025
4b80f6d
refactor: revert to explicit timeout parameters
imz87 Jul 27, 2025
15dfc47
refactor: assume applicationProtocols is non-null and remove nullabil…
imz87 Jul 27, 2025
b596572
refactor: reorganize http3 and quic packages based on responsibilities
imz87 Jul 27, 2025
de67cc1
refactor: reorganize http3 and quic packages based on responsibilities
imz87 Jul 27, 2025
778b018
refactor: simplify test hierarchy by making Http2H3Test extend Http2T…
imz87 Jul 27, 2025
fbba386
chore: reduce divergence from master by omitting non-critical refacto…
imz87 Jul 27, 2025
411fc16
chore: reduce divergence from master by omitting non-critical refacto…
imz87 Jul 27, 2025
5392a9b
chore: reduce divergence from master by omitting non-critical refacto…
imz87 Jul 28, 2025
f8c1fcb
chore: reduce divergence from master by omitting non-critical refacto…
imz87 Jul 28, 2025
17c9bad
chore: reduce divergence from master by omitting non-critical refacto…
imz87 Jul 28, 2025
e21c402
chore: reduce divergence from master by omitting non-critical refacto…
imz87 Jul 28, 2025
51373bf
chore: reduce divergence from master by omitting non-critical refacto…
imz87 Jul 28, 2025
65b384b
chore: reduce divergence from master by omitting non-critical refacto…
imz87 Jul 28, 2025
a7509b9
refactor: prepare for adding http3server tests
imz87 Jul 29, 2025
9531d91
refactor: prepare for adding http3server tests
imz87 Jul 31, 2025
7143b77
refactor: prepare for adding http3server tests
imz87 Jul 31, 2025
3196201
refactor: prepare for adding http3server tests
imz87 Jul 31, 2025
b711be7
refactor: prepare for adding http3server tests
imz87 Jul 31, 2025
9dd1de0
refactor: add http3TestClient for http3ServerTest
imz87 Jul 31, 2025
3ea8955
refactor: handle exceptions gracefully
imz87 Jul 31, 2025
413b098
refactor: use only onDataRead
imz87 Jul 31, 2025
e79dbea
refactor: implement testClient
imz87 Jul 31, 2025
8ee6117
refactor: ignore some tests
imz87 Jul 31, 2025
53d623a
refactor: generalize more server tests to support both HTTP/2 and HTT…
imz87 Jul 31, 2025
e9a8721
refactor: generalize more server tests to support both HTTP/2 and HTT…
imz87 Jul 31, 2025
9971d8f
refactor: generalize more server tests to support both HTTP/2 and HTT…
imz87 Jul 31, 2025
ca9b476
refactor: exception handling
imz87 Jul 31, 2025
2a4431d
refactor: issue
imz87 Jul 31, 2025
cb164a4
refactor: remove unused parts
imz87 Jul 31, 2025
dfdf8ea
refactor: throw exception on unwanted calls
imz87 Jul 31, 2025
ed46a2e
refactor: ensure both async tasks complete before proceeding
imz87 Jul 31, 2025
823b923
refactor: resolve issues with tests related to file transfer
imz87 Jul 31, 2025
7299202
refactor: resolve issues with tests related to close handling
imz87 Jul 31, 2025
a5e4378
Make compile
vietj Sep 4, 2025
3901efe
Fix ProxyOptionsTest
vietj Sep 4, 2025
66bd709
Introduce TransportOptions / TcpOptions
vietj Sep 5, 2025
64b5c77
Remove un-necessary QuicOptions parameter in ChannelProvider#connect
vietj Sep 5, 2025
cab925f
QuicOptions presence should be used instead of HttpVersion to select …
vietj Sep 5, 2025
c708f4c
QuicOptions presence should be used instead of ALPN protocols to sele…
vietj Sep 5, 2025
d3696ea
Merge remote-tracking branch 'vertx/master' into http3-support-5.x
vietj Sep 5, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions vertx-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,10 @@
<artifactId>netty-transport-classes-kqueue</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-codec-http3</artifactId>
</dependency>

<!-- Jackson -->
<dependency>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
package io.vertx.core.http;

import io.vertx.core.json.JsonObject;
import io.vertx.core.json.JsonArray;

/**
* Converter and mapper for {@link io.vertx.core.http.Http3Settings}.
* NOTE: This class has been automatically generated from the {@link io.vertx.core.http.Http3Settings} original class using Vert.x codegen.
*/
public class Http3SettingsConverter {

static void fromJson(Iterable<java.util.Map.Entry<String, Object>> json, Http3Settings obj) {
for (java.util.Map.Entry<String, Object> member : json) {
switch (member.getKey()) {
case "qpackMaxTableCapacity":
if (member.getValue() instanceof Number) {
obj.setQpackMaxTableCapacity(((Number)member.getValue()).longValue());
}
break;
case "maxFieldSectionSize":
if (member.getValue() instanceof Number) {
obj.setMaxFieldSectionSize(((Number)member.getValue()).longValue());
}
break;
case "qpackMaxBlockedStreams":
if (member.getValue() instanceof Number) {
obj.setQpackMaxBlockedStreams(((Number)member.getValue()).longValue());
}
break;
case "enableConnectProtocol":
if (member.getValue() instanceof Number) {
obj.setEnableConnectProtocol(((Number)member.getValue()).longValue());
}
break;
case "h3Datagram":
if (member.getValue() instanceof Number) {
obj.setH3Datagram(((Number)member.getValue()).longValue());
}
break;
case "enableMetadata":
if (member.getValue() instanceof Number) {
obj.setEnableMetadata(((Number)member.getValue()).longValue());
}
break;
}
}
}

static void toJson(Http3Settings obj, JsonObject json) {
toJson(obj, json.getMap());
}

static void toJson(Http3Settings obj, java.util.Map<String, Object> json) {
json.put("qpackMaxTableCapacity", obj.getQpackMaxTableCapacity());
json.put("maxFieldSectionSize", obj.getMaxFieldSectionSize());
json.put("qpackMaxBlockedStreams", obj.getQpackMaxBlockedStreams());
json.put("enableConnectProtocol", obj.getEnableConnectProtocol());
json.put("h3Datagram", obj.getH3Datagram());
json.put("enableMetadata", obj.getEnableMetadata());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,11 @@ static void fromJson(Iterable<java.util.Map.Entry<String, Object>> json, HttpCli
obj.setInitialSettings(new io.vertx.core.http.Http2Settings((io.vertx.core.json.JsonObject)member.getValue()));
}
break;
case "initialHttp3Settings":
if (member.getValue() instanceof JsonObject) {
obj.setInitialHttp3Settings(new io.vertx.core.http.Http3Settings((io.vertx.core.json.JsonObject)member.getValue()));
}
break;
case "alpnVersions":
if (member.getValue() instanceof JsonArray) {
java.util.ArrayList<io.vertx.core.http.HttpVersion> list = new java.util.ArrayList<>();
Expand Down Expand Up @@ -185,6 +190,9 @@ static void toJson(HttpClientOptions obj, java.util.Map<String, Object> json) {
if (obj.getInitialSettings() != null) {
json.put("initialSettings", obj.getInitialSettings().toJson());
}
if (obj.getInitialHttp3Settings() != null) {
json.put("initialHttp3Settings", obj.getInitialHttp3Settings().toJson());
}
if (obj.getAlpnVersions() != null) {
JsonArray array = new JsonArray();
obj.getAlpnVersions().forEach(item -> array.add(item.name()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,11 @@ static void fromJson(Iterable<java.util.Map.Entry<String, Object>> json, HttpSer
obj.setInitialSettings(new io.vertx.core.http.Http2Settings((io.vertx.core.json.JsonObject)member.getValue()));
}
break;
case "initialHttp3Settings":
if (member.getValue() instanceof JsonObject) {
obj.setInitialHttp3Settings(new io.vertx.core.http.Http3Settings((io.vertx.core.json.JsonObject)member.getValue()));
}
break;
case "alpnVersions":
if (member.getValue() instanceof JsonArray) {
java.util.ArrayList<io.vertx.core.http.HttpVersion> list = new java.util.ArrayList<>();
Expand Down Expand Up @@ -217,6 +222,9 @@ static void toJson(HttpServerOptions obj, java.util.Map<String, Object> json) {
if (obj.getInitialSettings() != null) {
json.put("initialSettings", obj.getInitialSettings().toJson());
}
if (obj.getInitialHttp3Settings() != null) {
json.put("initialHttp3Settings", obj.getInitialHttp3Settings().toJson());
}
if (obj.getAlpnVersions() != null) {
JsonArray array = new JsonArray();
obj.getAlpnVersions().forEach(item -> array.add(item.name()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@ static void fromJson(Iterable<java.util.Map.Entry<String, Object>> json, ClientO
obj.setLocalAddress((String)member.getValue());
}
break;
case "quicOptions":
if (member.getValue() instanceof JsonObject) {
obj.setQuicOptions(new io.vertx.core.net.QuicOptions((io.vertx.core.json.JsonObject)member.getValue()));
}
break;
}
}
}
Expand All @@ -72,5 +77,8 @@ static void toJson(ClientOptionsBase obj, java.util.Map<String, Object> json) {
if (obj.getLocalAddress() != null) {
json.put("localAddress", obj.getLocalAddress());
}
if (obj.getQuicOptions() != null) {
json.put("quicOptions", obj.getQuicOptions().toJson());
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,11 @@ static void fromJson(Iterable<java.util.Map.Entry<String, Object>> json, NetServ
obj.setRegisterWriteHandler((Boolean)member.getValue());
}
break;
case "quicOptions":
if (member.getValue() instanceof JsonObject) {
obj.setQuicOptions(new io.vertx.core.net.QuicOptions((io.vertx.core.json.JsonObject)member.getValue()));
}
break;
}
}
}
Expand Down Expand Up @@ -89,5 +94,8 @@ static void toJson(NetServerOptions obj, java.util.Map<String, Object> json) {
json.put("trafficShapingOptions", obj.getTrafficShapingOptions().toJson());
}
json.put("registerWriteHandler", obj.isRegisterWriteHandler());
if (obj.getQuicOptions() != null) {
json.put("quicOptions", obj.getQuicOptions().toJson());
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
package io.vertx.core.net;

import io.vertx.core.json.JsonObject;
import io.vertx.core.json.JsonArray;

/**
* Converter and mapper for {@link io.vertx.core.net.QuicOptions}.
* NOTE: This class has been automatically generated from the {@link io.vertx.core.net.QuicOptions} original class using Vert.x codegen.
*/
public class QuicOptionsConverter {

static void fromJson(Iterable<java.util.Map.Entry<String, Object>> json, QuicOptions obj) {
for (java.util.Map.Entry<String, Object> member : json) {
switch (member.getKey()) {
case "http3InitialMaxStreamsBidirectional":
if (member.getValue() instanceof Number) {
obj.setHttp3InitialMaxStreamsBidirectional(((Number)member.getValue()).longValue());
}
break;
case "http3InitialMaxData":
if (member.getValue() instanceof Number) {
obj.setHttp3InitialMaxData(((Number)member.getValue()).longValue());
}
break;
case "http3InitialMaxStreamDataBidirectionalLocal":
if (member.getValue() instanceof Number) {
obj.setHttp3InitialMaxStreamDataBidirectionalLocal(((Number)member.getValue()).longValue());
}
break;
case "http3InitialMaxStreamDataBidirectionalRemote":
if (member.getValue() instanceof Number) {
obj.setHttp3InitialMaxStreamDataBidirectionalRemote(((Number)member.getValue()).longValue());
}
break;
case "http3InitialMaxStreamDataUnidirectional":
if (member.getValue() instanceof Number) {
obj.setHttp3InitialMaxStreamDataUnidirectional(((Number)member.getValue()).longValue());
}
break;
case "http3InitialMaxStreamsUnidirectional":
if (member.getValue() instanceof Number) {
obj.setHttp3InitialMaxStreamsUnidirectional(((Number)member.getValue()).longValue());
}
break;
case "sslHandshakeTimeout":
if (member.getValue() instanceof Number) {
obj.setSslHandshakeTimeout(((Number)member.getValue()).longValue());
}
break;
case "sslHandshakeTimeoutUnit":
if (member.getValue() instanceof String) {
obj.setSslHandshakeTimeoutUnit(java.util.concurrent.TimeUnit.valueOf((String)member.getValue()));
}
break;
}
}
}

static void toJson(QuicOptions obj, JsonObject json) {
toJson(obj, json.getMap());
}

static void toJson(QuicOptions obj, java.util.Map<String, Object> json) {
json.put("http3InitialMaxStreamsBidirectional", obj.getHttp3InitialMaxStreamsBidirectional());
json.put("http3InitialMaxData", obj.getHttp3InitialMaxData());
json.put("http3InitialMaxStreamDataBidirectionalLocal", obj.getHttp3InitialMaxStreamDataBidirectionalLocal());
json.put("http3InitialMaxStreamDataBidirectionalRemote", obj.getHttp3InitialMaxStreamDataBidirectionalRemote());
json.put("http3InitialMaxStreamDataUnidirectional", obj.getHttp3InitialMaxStreamDataUnidirectional());
json.put("http3InitialMaxStreamsUnidirectional", obj.getHttp3InitialMaxStreamsUnidirectional());
json.put("sslHandshakeTimeout", obj.getSslHandshakeTimeout());
if (obj.getSslHandshakeTimeoutUnit() != null) {
json.put("sslHandshakeTimeoutUnit", obj.getSslHandshakeTimeoutUnit().name());
}
}
}
2 changes: 1 addition & 1 deletion vertx-core/src/main/java/examples/HTTP2Examples.java
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ public void example21(HttpConnection connection) {
}

public void example22(HttpConnection connection) {
connection.remoteSettingsHandler(settings -> {
connection.remoteHttp3SettingsHandler(settings -> {
System.out.println("Received new settings");
});
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
/*
* Copyright (c) 2011-2019 Contributors to the Eclipse Foundation
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0, or the Apache License, Version 2.0
* which is available at https://www.apache.org/licenses/LICENSE-2.0.
*
* SPDX-License-Identifier: EPL-2.0 OR Apache-2.0
*/

package examples.h3devexamples;

import io.netty.buffer.ByteBuf;
import io.vertx.core.Vertx;
import io.vertx.core.VertxOptions;
import io.vertx.core.buffer.Buffer;
import io.vertx.core.internal.net.NetSocketInternal;
import io.vertx.core.net.JdkSSLEngineOptions;
import io.vertx.core.net.NetClient;
import io.vertx.core.net.NetClientOptions;
import io.vertx.core.net.SocketAddress;

/**
* @author <a href="mailto:zolfaghari19@gmail.com">Iman Zolfaghari</a>
*/
public class HTTP2ClientExamplesVertxHandler {
protected NetClientOptions createNetClientOptions() {
NetClientOptions options = new NetClientOptions();
options
.setSslEngineOptions(new JdkSSLEngineOptions())
.setUseAlpn(true)
.setSsl(true)
.setTrustAll(true)
// .setHostnameVerificationAlgorithm("HTTPS")
.setHostnameVerificationAlgorithm("")
// .setTrustOptions(Trust.SERVER_JKS.get())
;

return options;
}

public void example02Local(Vertx vertx) {
String path = "/";
int port = 8090;
String host = "localhost";

/*
AtomicInteger requests = new AtomicInteger();

int n = 5;

for (int i = 0; i < n; i++) {
int counter = i + 1;
client.request(HttpMethod.GET, port, host, path)
.compose(req -> req.send("Msg " + counter))
.compose(HttpClientResponse::body)
.onSuccess(body -> System.out.println(
"Msg" + counter + " response body is: " + body))
.onComplete(event -> requests.incrementAndGet())
.onFailure(Throwable::printStackTrace)
;
}
*/

NetClient client = vertx.createNetClient(createNetClientOptions().setConnectTimeout(1000));

client.connect(SocketAddress.inetSocketAddress(8090, "localhost")).onSuccess(so -> {
NetSocketInternal soi = (NetSocketInternal) so;
StringBuilder part1 = new StringBuilder();
part1.append("1".repeat(1200));
part1.append("2".repeat(1200));
part1.append("3".repeat(1200));
part1.append("4".repeat(1200));

StringBuilder part2 = new StringBuilder();
part2.append("3".repeat(1200));
part2.append("4".repeat(1200));

soi.write(Buffer.buffer(part1.toString()));
// soi.write(Buffer.buffer(part2.toString()));
// soi.messageHandler(msg -> fail("Unexpected"));
soi.messageHandler(msg -> {
ByteBuf byteBuf = (ByteBuf) msg;

byte[]arr = new byte[byteBuf.readableBytes()];
byteBuf.copy().readBytes(arr);
System.out.println("received ByteBuf is: " + new String(arr));


if(!byteBuf.isDirect()) throw new RuntimeException();
if(1 != byteBuf.refCnt()) throw new RuntimeException();
// if(!"Hello World".equals(byteBuf.toString(StandardCharsets.UTF_8))) throw new RuntimeException();
if(!byteBuf.release()) throw new RuntimeException();
if(0 != byteBuf.refCnt()) throw new RuntimeException();
System.out.println("OK");
});
}).onFailure(Throwable::printStackTrace);






int n = 10000;
int i = 0;
while (i != n) {
i++;
try {
Thread.sleep(100);
} catch (InterruptedException e) {
throw new RuntimeException(e);
}
}
vertx.close();

}

public static void main(String[] args) {
Vertx vertx =
Vertx.vertx(new VertxOptions().setBlockedThreadCheckInterval(1_000_000_000));
new HTTP2ClientExamplesVertxHandler().example02Local(vertx);
}
}
Loading
Loading