Client.cpp 259 B

12345678910111213141516
  1. #include "server/network/Client.h"
  2. Client::Client() : peer(nullptr) {
  3. }
  4. void Client::connect(ENetPeer* peer) {
  5. Client::peer = peer;
  6. }
  7. void Client::disconnect() {
  8. peer = nullptr;
  9. }
  10. bool Client::isDisconnected() const {
  11. return peer == nullptr;
  12. }