33 lines
505 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
PeerInfo::Id recipient;
2014-09-17 16:43:05 +03:00
Type type;
ss_ data;
Packet(PeerInfo::Id recipient, const Type &type, const ss_ &data):
recipient(recipient), type(type), data(data){}
2014-09-17 16:43:05 +03:00
};
struct NewClient: public interface::Event::Private
2014-09-17 16:43:05 +03:00
{
2014-09-17 20:15:46 +03:00
PeerInfo info;
NewClient(const PeerInfo &info): info(info){}
2014-09-17 20:15:46 +03:00
};
2014-09-17 16:43:05 +03:00
}