MCPcopy Create free account
hub / github.com/TyphoonMC/TyphoonCore / ReadUInt16

Method ReadUInt16

utils.go:92–99  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

90}
91
92func (player *Player) ReadUInt16() (i uint16, err error) {
93 buff := player.io.buffer[:2]
94 _, err = io.ReadFull(player.io.rdr, buff)
95 if err != nil {
96 return 0, err
97 }
98 return binary.BigEndian.Uint16(buff), nil
99}
100
101func (player *Player) WriteUInt16(i uint16) (err error) {
102 buff := player.io.buffer[:2]

Callers 2

ReadMethod · 0.80
ReadMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected