wei-yb / ua_blackjack_server Goto Github PK
View Code? Open in Web Editor NEWA cpp BlackJack server project from IEG UA group.
A cpp BlackJack server project from IEG UA group.
LobbyService.cc文件中的void ua_blackjack::LobbyServer::HandleRequest(int)
(112行)函数:当读出eventfd的val时,val是有可能大于1的,意味着request_list_里面有多于1个待处理请求。最好循环PopFront val次来保证不会产生部分请求饥饿的现象。同样的,void ua_blackjack::LobbyServer::HandleResponse(int)
(127行)也会面临这个问题。
Room.cc文件中的void ua_blackjack::lobby::Room::Join_room(UID)
(8行)函数:当判定isFull()为true之后,打印出错误信息后并没有return,而是继续执行players_unready.insert()
,这样会不会导致即便房间已经满了,依旧可以加入?
如果上面问题确实存在,Lobby.cc文件中的bool Lobby::JoinRoom(UID, RoomID)
(78行)函数中对player的状态的更新也会有问题,尤其是player状态的更新在Join_room之前。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.