Closed navaneeth-dev closed 4 years ago
Or in other words how do i read packet data? Sorry if im noob (should probably put how to handle packet data in readme)
defer conn.Close() for { pk, err := conn.ReadPacket() if err != nil { log.Fatal(err) } var players []protocol.PlayerListEntry // //err = pk.Unmarshal([]byte(pk)) // // Handle the incoming packet. if err := conn.WritePacket(&packet.PlayerList{ ActionType: packet.PlayerListActionAdd, Entries: players, }); err != nil { break } }
Or in other words how do i read packet data? Sorry if im noob (should probably put how to handle packet data in readme)