Text和Binary有什么区别,感觉一直在用byte啊
select { case data = <-conn.outChan: case <-conn.closeChan: conn.Close() return } err := conn.wsConn.WriteMessage(websocket.TextMessage, data)
这个虽然是Text,但data是byte[]
select { case data = <-conn.outChan: case <-conn.closeChan: conn.Close() return } err := conn.wsConn.WriteMessage(websocket.TextMessage, data)
这个虽然是Text,但data是byte[]
2020-11-16
举报