YAPOG
0.0.1
Yet Another Pokemon Online Game
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
ClientManager.hpp
Go to the documentation of this file.
1
#ifndef YAPOG_SERVER_CLIENTMANAGER_HPP
2
# define YAPOG_SERVER_CLIENTMANAGER_HPP
3
4
# include "
YAPOG/Macros.hpp
"
5
# include "
YAPOG/System/Network/IPacket.hpp
"
6
# include "
YAPOG/Collection/List.hpp
"
7
# include "
YAPOG/System/Thread/Thread.hpp
"
8
# include "
YAPOG/System/Time/Time.hpp
"
9
10
namespace
yse
11
{
12
class
ClientSession;
13
14
class
ClientManager
15
{
16
DISALLOW_COPY
(
ClientManager
);
17
18
public
:
19
20
ClientManager
();
21
~ClientManager
();
22
23
void
AddClient
(
ClientSession
* client);
24
void
RemoveClient
(
ClientSession
* client);
25
26
void
LaunchReception
();
27
28
void
Refresh
();
29
void
Dispose
();
30
31
void
ServerTick
(
const
yap::Time
& dt);
32
33
private
:
34
35
void
HandleReception
();
36
37
static
const
yap::Time
DEFAULT_RECEPTION_SLEEP_DELAY
;
38
39
yap::collection::List<ClientSession*>
clients_
;
40
yap::Mutex
clientsMutex_
;
41
42
yap::Thread
receptionThread_
;
43
bool
receptionIsActive_
;
44
};
45
}
// namespace yse
46
47
#endif // YAPOG_SERVER_CLIENTMANAGER_HPP
YAPOG.Server
include
Server
ClientManager.hpp
Generated on Mon Sep 17 2012 22:24:22 for YAPOG by
1.8.1.1