mirror of
https://github.com/CPunch/gopenfusion.git
synced 2026-02-04 18:30:02 +00:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user