Commit Graph

7 Commits

Author SHA1 Message Date
670d4a514c more better CNPeer.Send()
this fixes a race condition where if 2 goroutines try to send a packet at the same time, they could end up being
malformed due to the 2 separate calls to peer.conn.Write().

instead of writing the packet size to peer.conn.Write() directly, we make space in buf for the packet size,
and patch it in place. this lets us get away with only having 1 call to peer.conn.Write() which will ensure that
the full packet is written properly and be goroutine safe :3
2023-08-23 17:38:10 -05:00
c09a6cfd25 fixed sent server time 2023-06-25 18:29:31 -05:00
f0b9bc6ed6 god forgive me for this commit 2023-06-25 01:51:21 -05:00
dfc00bcb52 shardServer: simplified peer map logic 2023-06-24 22:36:04 -05:00
70e42b5d79 server/shard: added UpdatePlayer(), which should be used whenever player struct state needs to be updated to prevent race conditions 2023-03-26 21:08:13 -05:00
bb29a988b3 landwalker achieved!
- the shard's ip sent to the client via the login server is currently hardcoded in config/config.go
- no packets other than P_CL2FE_REQ_PC_ENTER and P_CL2FE_REQ_PC_LOADING_COMPLETE are supported via the shard server
2023-03-22 17:07:16 -05:00
5b2a8b838e major refactoring: db.Player is now core.Player
- misc. cleanup
- core/db/players.go: works with core.Player types, will also grab inventory table
2023-03-22 00:30:58 -05:00