1
This commit is contained in:
parent
5447397c21
commit
8e251100d2
@ -606,3 +606,8 @@ void App::DispatchUdpMsg()
|
|||||||
working_msgnode_size_ = 0;
|
working_msgnode_size_ = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
long long App::NewUuid()
|
||||||
|
{
|
||||||
|
return uuid.Generate();
|
||||||
|
}
|
||||||
|
@ -35,6 +35,7 @@ class App : public a8::Singleton<App>
|
|||||||
|
|
||||||
void NotifyLoopCond();
|
void NotifyLoopCond();
|
||||||
bool HasFlag(int flag);
|
bool HasFlag(int flag);
|
||||||
|
long long NewUuid();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void QuickExecute();
|
void QuickExecute();
|
||||||
|
@ -36,6 +36,7 @@ KcpSession::~KcpSession()
|
|||||||
void KcpSession::Init(int socket_handle)
|
void KcpSession::Init(int socket_handle)
|
||||||
{
|
{
|
||||||
socket_handle_ = socket_handle;
|
socket_handle_ = socket_handle;
|
||||||
|
secret_key_ = App::Instance()->NewUuid();
|
||||||
kcp_ = ikcp_create(socket_handle_, (void*)this);
|
kcp_ = ikcp_create(socket_handle_, (void*)this);
|
||||||
ikcp_wndsize(kcp_, 128, 128);
|
ikcp_wndsize(kcp_, 128, 128);
|
||||||
ikcp_nodelay(kcp_, 2, 10, 2, 1);
|
ikcp_nodelay(kcp_, 2, 10, 2, 1);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user