Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correct document typo #4862

Merged
merged 1 commit into from
Sep 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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: 2 additions & 2 deletions src/main/asciidoc/datagrams.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ and NetClient (see above).

=== Creating a DatagramSocket

To use UDP you first need t create a {@link io.vertx.core.datagram.DatagramSocket}. It does not matter here if you only want to send data or send
To use UDP you first need to create a {@link io.vertx.core.datagram.DatagramSocket}. It does not matter here if you only want to send data or send
and receive.

[source,$lang]
Expand Down Expand Up @@ -54,7 +54,7 @@ Sending packets is as easy as shown here:
=== Receiving Datagram packets

If you want to receive packets you need to bind the {@link io.vertx.core.datagram.DatagramSocket} by calling
`listen(...)}` on it.
`listen(...)` on it.

This way you will be able to receive {@link io.vertx.core.datagram.DatagramPacket}s that were sent to the address and port on
which the {@link io.vertx.core.datagram.DatagramSocket} listens.
Expand Down
14 changes: 7 additions & 7 deletions src/main/asciidoc/http.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,7 @@ Or use {@link io.vertx.core.http.HttpServerResponse#putTrailer}.
If you were writing a web server, one way to serve a file from disk would be to open it as an {@link io.vertx.core.file.AsyncFile}
and pipe it to the HTTP response.

Or you could load it it one go using {@link io.vertx.core.file.FileSystem#readFile} and write it straight to the response.
Or you could load it in one go using {@link io.vertx.core.file.FileSystem#readFile} and write it straight to the response.

Alternatively, Vert.x provides a method which allows you to serve a file from disk or the filesystem to an HTTP response
in one operation.
Expand All @@ -580,7 +580,7 @@ Here's a very simple web server that serves files from the file system using sen
----

Sending a file is asynchronous and may not complete until some time after the call has returned. If you want to
be notified when the file has been written you can use {@link io.vertx.core.http.HttpServerResponse#sendFile(String)}
be notified when the file has been written you can use {@link io.vertx.core.http.HttpServerResponse#sendFile(String)}.

Please see the chapter about <<classpath, serving files from the classpath>> for restrictions about the classpath resolution or disabling it.

Expand Down Expand Up @@ -1020,7 +1020,7 @@ An {@link io.vertx.core.http.HttpClientRequest} instance is also a {@link io.ver

You can pipe to it from any {@link io.vertx.core.streams.ReadStream} instance.

For, example, you could pipe a file on disk to a http request body as follows:
For, example, you could pipe a file on disk to an http request body as follows:

[source,$lang]
----
Expand Down Expand Up @@ -1229,7 +1229,7 @@ Alternatively you can just parse the `Set-Cookie` headers yourself in the respon

The client can be configured to follow HTTP redirections provided by the `Location` response header when the client receives:

* a `301`, `302`, `307` or `308` status code along with a HTTP GET or HEAD method
* a `301`, `302`, `307` or `308` status code along with an HTTP GET or HEAD method
* a `303` status code, in addition the directed request perform an HTTP GET method

Here's an example:
Expand Down Expand Up @@ -1621,7 +1621,7 @@ NOTE: this only applies to the HTTP/2 protocol
Connection {@link io.vertx.core.http.HttpConnection#close} closes the connection:

- it closes the socket for HTTP/1.x
- a shutdown with no delay for HTTP/2, the {@literal GOAWAY} frame will still be sent before the connection is closed. *
- a shutdown with no delay for HTTP/2, the {@literal GOAWAY} frame will still be sent before the connection is closed.

The {@link io.vertx.core.http.HttpConnection#closeHandler} notifies when a connection is closed.

Expand Down Expand Up @@ -1660,7 +1660,7 @@ You can assign a number of event loop a client will use independently of the cli
When several HTTP servers listen on the same port, vert.x orchestrates the request handling using a
round-robin strategy.

Let's take a verticle creating a HTTP server such as:
Let's take a verticle creating an HTTP server such as:

.io.vertx.examples.http.sharing.HttpServerVerticle
[source,$lang]
Expand Down Expand Up @@ -1912,7 +1912,7 @@ The addresses of the handlers are given by {@link io.vertx.core.http.WebSocket#b

=== Using a proxy for HTTP/HTTPS connections

The http client supports accessing http/https URLs via a HTTP proxy (e.g. Squid) or _SOCKS4a_ or _SOCKS5_ proxy.
The http client supports accessing http/https URLs via an HTTP proxy (e.g. Squid) or _SOCKS4a_ or _SOCKS5_ proxy.
The CONNECT protocol uses HTTP/1.x but can connect to HTTP/1.x and HTTP/2 servers.

Connecting to h2c (unencrypted HTTP/2 servers) is likely not supported by http proxies since they will support
Expand Down
11 changes: 5 additions & 6 deletions src/main/asciidoc/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -903,7 +903,7 @@ may have not consumed the complete payload (the connection was cut before you we
Vert.x uses an an address resolver for resolving host name into IP addresses instead of
the JVM built-in blocking resolver.

An host name resolves to an IP address using:
A host name resolves to an IP address using:

- the _hosts_ file of the operating system
- otherwise DNS queries against a list of servers
Expand Down Expand Up @@ -944,7 +944,7 @@ Failover still applies and will use the next server in the list.

=== Hosts mapping

The _hosts_ file of the operating system is used to perform an hostname lookup for an ipaddress.
The _hosts_ file of the operating system is used to perform a hostname lookup for an ipaddress.

An alternative _hosts_ file can be used instead:

Expand All @@ -968,8 +968,7 @@ on Linux, it can be configured to a specific value with {@link io.vertx.core.dns

=== MacOS configuration

MacOS has a specific native extension to get the name server configuration of the system based on
<a href="https://opensource.apple.com/tarballs/mDNSResponder/">Apple's open source mDNSResponder</a>. When this extension is not present,
MacOS has a specific native extension to get the name server configuration of the system based on https://opensource.apple.com/tarballs/mDNSResponder/[Apple's open source mDNSResponder]. When this extension is not present,
Netty logs the following warning.

----
Expand All @@ -978,7 +977,7 @@ Netty logs the following warning.

This extension is not required as its absence does not prevent Vert.x to execute, yet is *recommended*.

You can use add it to your classpath to improve the integration and remove the warning.
You can add it to your classpath to improve the integration and remove the warning.

.Intel-based Mac
[source,xml]
Expand Down Expand Up @@ -1192,4 +1191,4 @@ directory and serves it from there. Do not use this setting in production, it ca

Finally, you can disable completely the cache by using `-Dvertx.disableFileCPResolving=true`. This setting is not
without consequences. Vert.x would be unable to read any files from the classpath (only from the file system). Be
very careful when using this settings.
very careful when using this setting.
10 changes: 8 additions & 2 deletions src/main/asciidoc/net.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -347,9 +347,15 @@ TCP server (Net/Http) can be configured with traffic shaping options to enable b
bandwidth can be limited through {@link io.vertx.core.net.TrafficShapingOptions}. For NetServer, traffic shaping options can be set
through {@link io.vertx.core.net.NetServerOptions} and for HttpServer it can be set through {@link io.vertx.core.http.HttpServerOptions}.

[source,$lang]
----
{@link examples.NetExamples#configureTrafficShapingForNetServer}
----

[source,$lang]
----
{@link examples.NetExamples#configureTrafficShapingForHttpServer}
----

[[ssl]]
=== Configuring servers and clients to work with SSL/TLS
Expand All @@ -369,7 +375,7 @@ By default it is disabled.

==== Specifying key/certificate for the server

SSL/TLS servers usually provide certificates to clients in order verify their identity to clients.
SSL/TLS servers usually provide certificates to clients in order to verify their identity to clients.

Certificates/keys can be configured for servers in several ways:

Expand Down Expand Up @@ -807,7 +813,7 @@ OpenSSL to be installed on your OS depending on the tcnative implementation.

=== Using a proxy for client connections

The {@link io.vertx.core.net.NetClient} supports either a HTTP/1.x _CONNECT_, _SOCKS4a_ or _SOCKS5_ proxy.
The {@link io.vertx.core.net.NetClient} supports either an HTTP/1.x _CONNECT_, _SOCKS4a_ or _SOCKS5_ proxy.

The proxy can be configured in the {@link io.vertx.core.net.NetClientOptions} by setting a
{@link io.vertx.core.net.ProxyOptions} object containing proxy type, hostname, port and optionally username and password.
Expand Down
2 changes: 1 addition & 1 deletion src/main/asciidoc/streams.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ Let's now look at the methods on `ReadStream` and `WriteStream` in more detail:
`ReadStream` is implemented by {@link io.vertx.core.http.HttpClientResponse}, {@link io.vertx.core.datagram.DatagramSocket},
{@link io.vertx.core.http.HttpClientRequest}, {@link io.vertx.core.http.HttpServerFileUpload},
{@link io.vertx.core.http.HttpServerRequest}, {@link io.vertx.core.eventbus.MessageConsumer},
{@link io.vertx.core.net.NetSocket}, {@link io.vertx.core.http.WebSocket}, {@link io.vertx.core.file.AsyncFile}.
{@link io.vertx.core.net.NetSocket}, {@link io.vertx.core.http.WebSocket} and {@link io.vertx.core.file.AsyncFile}.

- {@link io.vertx.core.streams.ReadStream#handler}:
set a handler which will receive items from the ReadStream.
Expand Down
Loading