WriteJSON adds a packet to the packet stack, after which will be written as JSON to the websocket connection.
(v interface{})
| 431 | // WriteJSON adds a packet to the packet stack, after which will be written as JSON to the websocket |
| 432 | // connection. |
| 433 | func (player *Player) WriteJSON(v interface{}) error { |
| 434 | player.packetStack <- v |
| 435 | return nil |
| 436 | } |
| 437 | |
| 438 | // sendPackets continuously sends packets to the websocket connection until the player is disconnected. |
| 439 | func (player *Player) sendPackets() { |
no outgoing calls
no test coverage detected