Closed rangshu closed 6 years ago
i found a answer for first question. c.socket.ReadMessage() wait for messages so, print "client read" message in terminal once every chat
also, write() in client.go.
for msg := c.send {}
equals below code.
for {
if msg, ok := <- c.send; ok {
}
}
so, write() in client.go has infinite loop.
and i found a answer for second question.
i think, this order