Solution 2: Working with TCP/IP and WebSocket

Let’s solve the challenge set in the previous lesson.

We'll cover the following

Solution

Here is the concurrent TCP server (concTCP.go) that generates random numbers in a range that is given by the TCP client.

To run the client side, open a new terminal window and copy and paste the command below into it.

Get hands-on with 1200+ tech skills courses.