Commit 470215a
committed
feat(tfo): add preview support for TFO
This update adds preview support for TCP Fast Open.
When TFO is enabled the driver either sends Bolt Handshake (for non-encrypted connections) or TLS handshake (for encrypted connections).
The TCP Fast Open is only supported when all of the following is true:
- The system the driver is running on supports and has TCP Fast Open enabled.
- One of the following connection URI schemes is used:
- neo4j
- neo4j+s
- neo4j+ssc
- bolt
- bolt+s
- bolt+ssc
- One of the following Netty Native Transports that is compatible with the system the driver is running on is added to the runtime by the user:
- netty-transport-native-io_uring (Netty 4.2+ only)
- netty-transport-native-epoll
- netty-transport-native-kqueue
Even when all of the above is true, it is important to make sure that the endpoint the driver connects to also supports and has TCP Fast Open enabled.
At present, this is an opt-in `Config` option available via `ConfigBuilder#withTcpFastOpenEnabled(boolean)`. It is `false` by default.1 parent dd3dca2 commit 470215a
File tree
2 files changed
+71
-4
lines changed- driver/src/main/java/org/neo4j/driver
- internal
2 files changed
+71
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
156 | 156 | | |
157 | 157 | | |
158 | 158 | | |
| 159 | + | |
159 | 160 | | |
160 | 161 | | |
161 | 162 | | |
162 | 163 | | |
163 | 164 | | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
164 | 173 | | |
165 | 174 | | |
166 | 175 | | |
| |||
183 | 192 | | |
184 | 193 | | |
185 | 194 | | |
| 195 | + | |
186 | 196 | | |
187 | 197 | | |
188 | 198 | | |
| |||
403 | 413 | | |
404 | 414 | | |
405 | 415 | | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
406 | 430 | | |
407 | 431 | | |
408 | 432 | | |
| |||
425 | 449 | | |
426 | 450 | | |
427 | 451 | | |
| 452 | + | |
428 | 453 | | |
429 | 454 | | |
430 | 455 | | |
| |||
874 | 899 | | |
875 | 900 | | |
876 | 901 | | |
| 902 | + | |
| 903 | + | |
| 904 | + | |
| 905 | + | |
| 906 | + | |
| 907 | + | |
| 908 | + | |
| 909 | + | |
| 910 | + | |
| 911 | + | |
| 912 | + | |
| 913 | + | |
| 914 | + | |
| 915 | + | |
| 916 | + | |
| 917 | + | |
| 918 | + | |
| 919 | + | |
| 920 | + | |
| 921 | + | |
| 922 | + | |
| 923 | + | |
| 924 | + | |
| 925 | + | |
| 926 | + | |
| 927 | + | |
| 928 | + | |
| 929 | + | |
| 930 | + | |
| 931 | + | |
| 932 | + | |
| 933 | + | |
| 934 | + | |
| 935 | + | |
| 936 | + | |
| 937 | + | |
| 938 | + | |
| 939 | + | |
| 940 | + | |
| 941 | + | |
| 942 | + | |
877 | 943 | | |
878 | 944 | | |
879 | 945 | | |
| |||
Lines changed: 5 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
361 | 361 | | |
362 | 362 | | |
363 | 363 | | |
364 | | - | |
| 364 | + | |
365 | 365 | | |
366 | 366 | | |
367 | 367 | | |
| |||
401 | 401 | | |
402 | 402 | | |
403 | 403 | | |
404 | | - | |
| 404 | + | |
405 | 405 | | |
406 | 406 | | |
407 | 407 | | |
408 | 408 | | |
409 | 409 | | |
410 | 410 | | |
411 | | - | |
412 | | - | |
| 411 | + | |
| 412 | + | |
413 | 413 | | |
414 | 414 | | |
415 | 415 | | |
416 | 416 | | |
417 | 417 | | |
| 418 | + | |
418 | 419 | | |
419 | 420 | | |
420 | 421 | | |
| |||
0 commit comments