1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-11-28 08:48:48 +02:00
vcmi/server/CVCMIServer.h
Michał W. Urbańczyk 3474fdaf05 * save/load partially working
* Arena and Witch Hut support
* improved support for Resources
* minor fixes and changes
2009-01-10 22:08:18 +00:00

36 lines
843 B
C++

#ifndef __CVCMISERVER_H__
#define __CVCMISERVER_H__
#include "../global.h"
#include <set>
class CConnection;
namespace boost
{
namespace asio
{
class io_service;
namespace ip
{
class tcp;
}
template <typename Protocol> class socket_acceptor_service;
template <typename Protocol,typename SocketAcceptorService>
class basic_socket_acceptor;
}
};
class CVCMIServer
{
boost::asio::io_service *io;
boost::asio::basic_socket_acceptor<boost::asio::ip::tcp, boost::asio::socket_acceptor_service<boost::asio::ip::tcp> > * acceptor;
std::map<int,CConnection*> connections;
std::set<CConnection*> conns;
public:
CVCMIServer();
~CVCMIServer();
void setUpConnection(CConnection *c, std::string mapname, si32 checksum);
void newGame(CConnection *c);
void loadGame(CConnection *c);
void start();
};
#endif // __CVCMISERVER_H__