select { case data = <-conn.outChan: case <-conn.closeChan: conn.Close() return } err := conn.wsConn.WriteMessage(websocket.TextMessage, data)
这个虽然是Text,但data是byte[]