MCPcopy Create free account
hub / github.com/Sandertv/mcwss / WriteJSON

Method WriteJSON

player.go:433–436  ·  view source on GitHub ↗

WriteJSON adds a packet to the packet stack, after which will be written as JSON to the websocket connection.

(v interface{})

Source from the content-addressed store, hash-verified

431// WriteJSON adds a packet to the packet stack, after which will be written as JSON to the websocket
432// connection.
433func (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.
439func (player *Player) sendPackets() {

Callers 3

ExecMethod · 0.95
unsubscribeFromMethod · 0.95
onMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected