Setting the Timeout Period on the Client Side
Let’s learn how to set the timeout period on the client side.
We'll cover the following...
We'll cover the following...
This lesson presents a technique for timing out network connections that take too long to finish on the client side. So, if the client does not receive a response from the server in the desired time, it closes the connection.
Coding example
The timeoutClient.go source file, without the import block, illustrates the technique.
In the code above, we define global variables and a structure that are going to be used in the rest of the program.
...