-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathLinkLevelEvent.h
45 lines (43 loc) · 1.02 KB
/
LinkLevelEvent.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/*
* SEGS - Super Entity Game Server
* http://www.segs.io/
* Copyright (c) 2006 - 2019 SEGS Team (see AUTHORS.md)
* This software is licensed under the terms of the 3-clause BSD License. See LICENSE.md for details.
*/
#pragma once
#include <cassert>
#include <ace/INET_Addr.h>
#include "SEGSEvent.h"
namespace SEGSEvents {
// [[ev_def:type]]
class Connect : public Event
{
public:
Connect(EventSrc *ev_src=nullptr) : Event(evConnect,ev_src)
{
}
Connect(EventSrc *ev_src,const ACE_INET_Addr &addr) :
Event(evConnect,ev_src),
src_addr(addr)
{
assert(ev_src);
}
EVENT_IMPL(Connect)
// [[ev_def:field]]
ACE_INET_Addr src_addr;
};
// [[ev_def:type]]
class Disconnect : public Event
{
public:
// [[ev_def:field]]
uint64_t m_session_token;
Disconnect(EventSrc *ev_src=nullptr) : Event(evDisconnect,ev_src)
{
}
Disconnect(uint64_t token) : Event(evDisconnect,nullptr),m_session_token(token)
{
}
EVENT_IMPL(Disconnect)
};
} // end of SEGSEvents namespace