Exercises
- Read the documentation of the net package in order to find out about its list of available functions at https://golang.org/pkg/net/.
- Wireshark is a great tool for analyzing network traffic of any kind: try to use it more.
- Change the code of
socketClient.go
in order to read the input from the user. - Change the code of
socketServer.go
in order to return a random number to the client. - Change the code of
TCPserver.go
in order to stop when it receives a given Unix signal from the user. - Change the Go code of
concTCP.go
in order to keep track of the number of clients it has served and print that number before exiting. - Add a
quit()
function toRPCserver.go
that does what its name implies. - Develop your own RPC example.