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

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.

Get hands-on with 1400+ tech skills courses.