java.lang.Object
tech.kwik.sample.echo.EchoClientUsing0RTT
A simple client that runs a very simple echo protocol on top of QUIC. This client will use 0-RTT when possible.
The echo protocol is a request-response protocol, where the client sends one request on a new stream and the server
responds by echoing the data from the request in a response on the same stream. After sending the response, the
stream is closed.
If a session ticket can be found, this client tries to setup the QUIC connection with the session ticket and
send its request data via 0-RTT. A session ticket is saved to file (named echoclientsessionticket.bin), so just
run the client a single time to obtain a session ticket.
The class' main method requires one argument:
- port number of the server (which is assumed to run on localhost)
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
SESSIONTICKET_FILE
- See Also:
-
-
Constructor Details
-
EchoClientUsing0RTT
public EchoClientUsing0RTT(int serverPort)
-
-
Method Details
-
main
- Throws:
IOException
-
run
- Throws:
IOException
-