The version of the golang which I am using is 1.12.9 with Win10.
I want to print something while the client is waiting for server.
The following are the partial code of server and client.
Server:
time.Sleep(time.Second * 100)
ws.Write([]byte("Hello!"))
Client:
while(!ws.Read(msg)){
fmt.Println("Please wait because server is busy.")
}
Can anyone suggest how to fix the code?
Any help is appreciated.
Thank you very much!
Max