[go-nuts] Re: Print something while read message from server with websocket

2020-03-27 Thread 洪嘉鴻
I'm sorry that I didn't remind that my Client code does not compile. I've tried your example with SetReadDeadline (). It seems like what I want to do. Thank you very much! Max Jake

[go-nuts] Re: Print something while read message from server with websocket

2020-03-26 Thread 洪嘉鴻
Thanks for your replying. I'm sorry that I didn't remind that my Client code does not compile. I've tried your example with SetReadDeadline (). It seems like what I want to do. However, I

[go-nuts] Re: Print something while read message from server with websocket

2020-03-26 Thread 洪嘉鴻
I'm sorry that I didn't remind that my Client code does not compile. I've tried your example with SetReadDeadline (). It seems like what I want to do. Thank you very much! Max Jake

[go-nuts] Re: Print something while read message from server with websocket

2020-03-26 Thread Jake Montgomery
Your Client code does not compile. As a courtesy to those trying to help, it is always good to test your code before posting it. A working example, without your "busy" messages would be something like: https://play.golang.org/p/cvgwd8GDobc . The Read()

[go-nuts] Re: Print something while read message from server with websocket

2020-03-25 Thread 洪嘉鴻
I'm sorry. The followings are the complete codes of server and client: Server Client Thank you very much! Max Jake Montgomery於 2020年3月25日星期三 UTC+8下午9時28分37秒寫道: > > You do not provide enough information to give

[go-nuts] Re: Print something while read message from server with websocket

2020-03-25 Thread Jake Montgomery
You do not provide enough information to give a really good answer. There are a number of ways to achieve this, but they depend on the details. A more complete example would help. What is the type of `ws`? If it is something on which you can set a read timeout, then one way would be to set a