initial player stuff
This commit is contained in:
parent
4b60ece582
commit
00f26c431e
38 changed files with 1107 additions and 93 deletions
lib/wSocket
|
@ -44,14 +44,14 @@ void W::Server::stop()
|
|||
}
|
||||
}
|
||||
|
||||
const W::Socket& W::Server::getConnection(uint64_t p_id) const
|
||||
const W::Socket* W::Server::getConnection(uint64_t p_id) const
|
||||
{
|
||||
std::map<uint64_t, Socket*>::const_iterator itr = connections.find(p_id);
|
||||
if (itr == connections.end()) {
|
||||
throw new SocketAccessError();
|
||||
}
|
||||
|
||||
return *(itr->second);
|
||||
return itr->second;
|
||||
}
|
||||
|
||||
uint64_t W::Server::getConnectionsCount() const
|
||||
|
|
|
@ -27,7 +27,7 @@ namespace W
|
|||
void listen(uint16_t port);
|
||||
void stop();
|
||||
|
||||
const Socket& getConnection(uint64_t p_id) const;
|
||||
const Socket* getConnection(uint64_t p_id) const;
|
||||
uint64_t getConnectionsCount() const;
|
||||
void closeConnection(uint64_t p_id);
|
||||
void openConnection(const String& addr, const Uint64& port);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue