protocol/packet: switch away from allocation

- Packet struct is small enough that allocation for it is really unnecessary, and can be passed around by value fairly easily
This commit is contained in:
2023-03-10 20:00:06 -06:00
parent 985890d351
commit f1552830a0
4 changed files with 14 additions and 17 deletions

View File

@@ -42,7 +42,7 @@ func (server *LoginServer) Start() {
}
}
func (server *LoginServer) HandlePacket(peer *Peer, typeID uint32, pkt *protocol.Packet) {
func (server *LoginServer) HandlePacket(peer *Peer, typeID uint32, pkt protocol.Packet) {
switch typeID {
case protocol.P_CL2LS_REQ_LOGIN:
server.Login(peer, pkt)