Proud::CNetClientInfo Class Reference

Public Member Functions

PROUD_API String ToString (bool atServer)
 

Public Attributes

AddrPort m_TcpAddrFromServer
 
AddrPort m_UdpAddrFromServer
 
AddrPort m_UdpAddrInternal
 
HostID m_HostID
 
bool m_RelayedP2P
 
HostIDSet m_joinedP2PGroups
 
bool m_isBehindNat
 
bool m_realUdpEnabled
 
String m_natDeviceName
 
int m_recentPingMs
 
int m_sendQueuedAmountInBytes
 
void * m_hostTag
 
double m_recentFrameRate
 
uint32_t m_toServerSendUdpMessageTrialCount
 
uint32_t m_toServerSendUdpMessageSuccessCount
 
uint32_t m_hostIDRecycleCount
 
int64_t m_unreliableMessageRecentReceiveSpeed
 

Detailed Description

Information structure of other host

Member Data Documentation

HostID Proud::CNetClientInfo::m_HostID

int of peer that assigned from CNetServer

uint32_t Proud::CNetClientInfo::m_hostIDRecycleCount

Total reused count of HostID that client is using currently.

  • You can decide reusing with StartParameter.m_HostIDGenerationPolicy.
  • If you select non-recyle option, value will be 0
void* Proud::CNetClientInfo::m_hostTag

Pointer of user defined tag.

bool Proud::CNetClientInfo::m_isBehindNat

If it is true, it means this client locates behind of NAT device.

HostIDSet Proud::CNetClientInfo::m_joinedP2PGroups

P2P group list that this client joined with

String Proud::CNetClientInfo::m_natDeviceName

Name of NAT device which operated by this client

  • You can get it from CNetServer only.
  • If client actually locate behind of NAT device, it will take some time to get a name. So if you get client information that just loged on, it may empty. This case you can get name of NAT device by reloading client information in a few minutes.
bool Proud::CNetClientInfo::m_realUdpEnabled

If it is ture, it means UDP communication between this client and server is still up and running. If it is false, it means TCP is being used because UDP communication is impossible.

double Proud::CNetClientInfo::m_recentFrameRate

Frame Rate of client.

  • User enter this value on CNetClient.SetApplicationHint.
  • It does not send to each peer, it only use to check Frame Rate of client at server.
  • To reduce traffic, frame rate will send/receive as float value.
int Proud::CNetClientInfo::m_recentPingMs

Average ping time that measure recently (Second)

bool Proud::CNetClientInfo::m_RelayedP2P

If it is ture, it means this client peer is doing P2P relay with RMI through a server.

int Proud::CNetClientInfo::m_sendQueuedAmountInBytes

Total amount(byte) of waiting message to this peer.

  • When it get about peer from server, it is total sending amount of server to client
  • When it get about peer from client, it is total sending amount of client to client (except message that relayed)
AddrPort Proud::CNetClientInfo::m_TcpAddrFromServer

TCP socket address of peer from server side. It is official internet address (external addr).

  • Client is connected to server but it does not success hole-punching yet. Anyway it need to get address so that is why this field exists.
  • Other remote peer can not get this value as security reason.
uint32_t Proud::CNetClientInfo::m_toServerSendUdpMessageSuccessCount

Total number of attempt to success sending Udp packet to server from client

uint32_t Proud::CNetClientInfo::m_toServerSendUdpMessageTrialCount

Total number of attempt to send Udp packet to server from client

AddrPort Proud::CNetClientInfo::m_UdpAddrFromServer

Client's UDP socket address from server side. It is recognized address once client finished hole-punching with server.

AddrPort Proud::CNetClientInfo::m_UdpAddrInternal

UDP socket address of inside of peer

  • Client that has not finished UDP hole-punching with server. If client communicate wiht only TCP, it can be Unassigned. However it is not wrong situation.