1
This commit is contained in:
parent
9de27d574f
commit
a35add02b6
@ -228,7 +228,19 @@ long long GCListener::GetSentBytesNum()
|
||||
return tcp_listener_->sent_bytes_num;
|
||||
}
|
||||
|
||||
std::shared_ptr<KcpSession> GCListener::GetKcpSessionByRemoteKey(long long key)
|
||||
{
|
||||
auto itr = kcp_session_addr_hash_.find(key);
|
||||
return itr != kcp_session_addr_hash_.end() ? itr->second : nullptr;
|
||||
}
|
||||
|
||||
std::shared_ptr<KcpSession> GCListener::GetKcpSessionBySocketHandle(int socket_handle)
|
||||
{
|
||||
auto itr = kcp_session_handle_hash_.find(socket_handle);
|
||||
return itr != kcp_session_handle_hash_.end() ? itr->second : nullptr;
|
||||
}
|
||||
|
||||
void GCListener::ProcUdpPacket(a8::UdpPacket* pkt)
|
||||
{
|
||||
|
||||
long long key = pkt->GetRemoteKey();
|
||||
}
|
||||
|
@ -37,6 +37,8 @@ class GCListener : public a8::Singleton<GCListener>
|
||||
long long GetSendNodeNum();
|
||||
long long GetSentBytesNum();
|
||||
|
||||
std::shared_ptr<KcpSession> GetKcpSessionByRemoteKey(long long key);
|
||||
std::shared_ptr<KcpSession> GetKcpSessionBySocketHandle(int socket_handle);
|
||||
void ProcUdpPacket(a8::UdpPacket* pkt);
|
||||
|
||||
private:
|
||||
|
Loading…
x
Reference in New Issue
Block a user