Proud::CStartServerParameter Class Reference
Inheritance diagram for Proud::CStartServerParameter:

Public Member Functions

PROUDSRV_API CStartServerParameter ()
 

Public Attributes

CFastArray< int > m_tcpPorts
 
CFastArray< int > m_udpPorts
 
ServerUdpAssignMode m_udpAssignMode
 
bool m_enableIocp
 
bool m_upnpDetectNatDevice
 
bool m_upnpTcpAddPortMapping
 
bool m_usingOverBlockIcmpEnvironment
 
uint32_t m_clientEmergencyLogMaxLineCount
 
bool m_enablePingTest
 
bool m_ignoreFailedBindPort
 
CFastArray< int > m_failedBindPorts
 
int m_tunedNetworkerSendIntervalMs_TEST
 
bool m_simplePacketMode
 Simple network protocol mode.
 
HostIDGenerationPolicy m_hostIDGenerationPolicy
 
CriticalSectionSettings m_bottleneckWarningSettings
 
bool m_enableAutoConnectionRecoveryOnServer
 
- Public Attributes inherited from Proud::CStartServerParameterBase
String m_serverAddrAtClient
 
String m_localNicAddr
 
Guid m_protocolVersion
 
int m_threadCount
 
int m_netWorkerThreadCount
 
EncryptLevel m_encryptedMessageKeyLength
 
FastEncryptLevel m_fastEncryptedMessageKeyLength
 
bool m_enableP2PEncryptedMessaging
 
bool m_allowServerAsP2PGroupMember
 
uint32_t m_timerCallbackIntervalMs
 
int32_t m_timerCallbackParallelMaxCount
 
void * m_timerCallbackContext
 
bool m_enableNagleAlgorithm
 
HostID m_reservedHostIDFirstValue
 
int m_reservedHostIDCount
 
CThreadPoolm_externalUserWorkerThreadPool
 
CThreadPoolm_externalNetWorkerThreadPool
 
bool m_allowExceptionEvent
 
bool m_enableEncryptedMessaging
 

Detailed Description

Parameters for NetServer startup.

Constructor & Destructor Documentation

PROUDSRV_API Proud::CStartServerParameter::CStartServerParameter ( )

Constructor method

Member Data Documentation

CriticalSectionSettings Proud::CStartServerParameter::m_bottleneckWarningSettings

When the value is set, a warning and a dump file are generated when NetServer bottleneck occurs. Unless it is a special situation, do not carelessly set this value.

uint32_t Proud::CStartServerParameter::m_clientEmergencyLogMaxLineCount

Server will select method of issuing HostID

  • Default is HostIDGenerationPolicy_NoRecycle.

This is number of emergency log line for client

  • Default is 0
  • Once you set this value, client create LogFile when NetClient call DumpEmergencyLog.
bool Proud::CStartServerParameter::m_enableIocp

FOR TEST USE! DO NOT MODIFY THIS

CFastArray<int> Proud::CStartServerParameter::m_failedBindPorts

When you set m_ignoreFailedBindPort to true, port list of failed bind will be there.

  • When m_ignoreFailedBindPort is false, value does not fill in.
HostIDGenerationPolicy Proud::CStartServerParameter::m_hostIDGenerationPolicy

It is an option for HostID reuse function.

  • If HostIDGenerationPolicy_Recycle is set, HostID will be reused according to HostIDRecycleAllowTimeMs of CNetConfig.
  • If HostIDGenerationPolicy_NoRecycle is set, unique HostID (until INT_MAX) will be guaranteed.

Default value is HostIDGenerationPolicy_Recycle.

bool Proud::CStartServerParameter::m_ignoreFailedBindPort

When you set this value to true, it bind next port if it has port that already using in m_udpports.

  • Default is false
  • Failed port list will go through to m_failedBindPorts
bool Proud::CStartServerParameter::m_simplePacketMode

Simple network protocol mode.

Default is false. Setting this to true allows dummy client test via packet capture and replication method. However, it will make service vulnerable to hackers, and does not allow UDP networking and direct P2P communication (will be relayed instead.) You should set this to false for live service.

Notice for packet capture and replay test:

  • Each dummy client cannot identify self HostID. Unexpected behavior may occur if you call P2P group functions such as CreateP2PGroup().
CFastArray<int> Proud::CStartServerParameter::m_tcpPorts

TCP listening port

  • The initial value is 0. The TCP listening port is to be allocated automatically when 0 is designated. It is useful to use the automatic allocation when a client received an automatically allocated port number before connected to the server, for exmple, when you need to launch multiple anonymous servers for a stress test. If this is the case, then the server must let the clients know the automatically allocated port addresses. The automatically allocated port numbers can be acquired using GetServerAddrPort().
ServerUdpAssignMode Proud::CStartServerParameter::m_udpAssignMode

This is the policy of using UDP port.

CFastArray<int> Proud::CStartServerParameter::m_udpPorts

This is a list of UDP host port When m_udpAssignMode is same as Proud.ServerUdpAssignMode_PerClient, this list will be ignored;

When m_udpAssignMode is same as Proud.ServerUdpAssignMode_Static, this list will work as followings;

  • in the case the allocation containing 0 value: The UDP sockets, as many as of the number of 0s containing, with random port numbers will be prepared. CNetServer.GetServerUdpAddrPort() is used to get the port numbers that are actually allocated.
  • in the case the allocation containing other values other than 0: The UDP sockets with the values contained within the allocation will be prepared.
bool Proud::CStartServerParameter::m_upnpDetectNatDevice

This is used to decide wheter to use universal plug and play function for the clients when required.

  • The default vlaue is true.
  • It may not be necessary when CNetClient is used between server communications then set tis value as false.
bool Proud::CStartServerParameter::m_upnpTcpAddPortMapping

TODO:translate needed. If true, the TCP hole punching connection is forced to be port mapped using the universal plug and play (UPNP) feature if needed in the client.

  • If this feature is turned on, it controls the upnp port mapping connection to the TCP hole punching connection to stabilize the connection to TCP.
  • If the TCP connection is open in general, this feature is not really necessary. Therefore, the basic value is false.
bool Proud::CStartServerParameter::m_usingOverBlockIcmpEnvironment

If there exists a strong policy that totally eliminates all types of communications from the host with ICMP packet from server firewalls, then this value must be set as true. However, there could be some cases when Per client UDP asigne mode is used and working well while this value is not set as true, but it is recommended to set this value as false.

  • The policy mentioned above is not recommended to stick with since it makes the exchange of the packets that restricted TTL impossible, causing some routers detect the servers as mullware.
  • The default value is false.