Giter VIP home page Giter VIP logo

ua_blackjack_server's People

Contributors

001stevejing avatar lsxk-jwj avatar rickizhang avatar

Watchers

 avatar

ua_blackjack_server's Issues

Bugs in LobbyServer?

  1. 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行)也会面临这个问题。

  2. Room.cc文件中的void ua_blackjack::lobby::Room::Join_room(UID)(8行)函数:当判定isFull()为true之后,打印出错误信息后并没有return,而是继续执行players_unready.insert(),这样会不会导致即便房间已经满了,依旧可以加入?

  3. 如果上面问题确实存在,Lobby.cc文件中的bool Lobby::JoinRoom(UID, RoomID)(78行)函数中对player的状态的更新也会有问题,尤其是player状态的更新在Join_room之前。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.