31 lines
442 B
C
Raw Normal View History

2014-09-17 16:43:05 +03:00
#include "interface/event.h"
namespace network
{
struct PeerInfo
{
typedef size_t Id;
2014-09-17 20:15:46 +03:00
2014-09-17 16:43:05 +03:00
Id id = 0;
ss_ address;
};
struct Packet: public interface::Event::Private
{
typedef size_t Type;
2014-09-17 20:15:46 +03:00
2014-09-17 16:43:05 +03:00
Type type;
ss_ data;
Packet(const Type &type, const ss_ &data): type(type), data(data){}
};
2014-09-17 20:15:46 +03:00
struct ClientConnected: public interface::Event::Private
2014-09-17 16:43:05 +03:00
{
2014-09-17 20:15:46 +03:00
PeerInfo info;
ClientConnected(const PeerInfo &info): info(info){}
};
2014-09-17 16:43:05 +03:00
}