This is an initial setup value when the server initializes. The initial values of the server directly affect server functions. Please refer ProudNet Tips for performance enhancement for more details.
bool Proud::CStartServerParameterBase::m_allowExceptionEvent |
- Decide whether it uses OnException callback function or not.
- Default value is true.
- If setting it as false, when exception occurs during user callback, crash will occur as OnException is not called.
bool Proud::CStartServerParameterBase::m_allowServerAsP2PGroupMember |
This is a value to decide whether the server can be included as the member of P2P Group or not.
bool Proud::CStartServerParameterBase::m_enableEncryptedMessaging |
- Turn on or off the encryption feature.
- Generally it’s better to turn on the encryption feature. However, when the client connects to the server, the calculation time of the server is spent more to exchange encryption keys.
- If this is a game server without any need for an encryption feature, it’s better to turn off this feature.
- The default value is true.
bool Proud::CStartServerParameterBase::m_enableNagleAlgorithm |
Turn on or off TCP delayed transmitting function and Nagle algorism function. It normally use TCP and sensitive with latency. If application does not require high traffic, sometimes set this value to false.
- Default value is true
- If it is true, it will trun on TCP Nagle algorism and turn off delayed sending function.
- If it is false, it will turn off TCP Nagle algorism and turn on delayed sending function.
- TCP Nagle algorism is different depends on OS. Longest time that reported is 0.7 second in WAN, Host between Windows.
- ProudNet's delayed sending function is 0.01 second for longest.
bool Proud::CStartServerParameterBase::m_enableP2PEncryptedMessaging |
This is used to turn on/off the encryption function of P2P RMI message. The default value is false.
- If the user sets this as false then it is impossible to use encrypted P2P RMI. Instead, the server performance is improved.
- If the user uses encrypted messaging with its value being false, then OnError will be called back.
EncryptLevel Proud::CStartServerParameterBase::m_encryptedMessageKeyLength |
CThreadPool* Proud::CStartServerParameterBase::m_externalNetWorkerThreadPool |
CThreadPool* Proud::CStartServerParameterBase::m_externalUserWorkerThreadPool |
FastEncryptLevel Proud::CStartServerParameterBase::m_fastEncryptedMessageKeyLength |
String Proud::CStartServerParameterBase::m_localNicAddr |
This is the address that the listening socket of the server to be bound.
- The initial value is an empty value.
- It is usual to designate an empty value for this but it is used in the case that the server has more than 2 Network Interfces (NIC) and when only one of them is able to receive a connection request from CNetClient. Either an IP address or a host name that is registered by the NIC must be designated. It is possible to use Proud.GetLocalIPAddresses to acquire the NIC address list in the host.
- When a hostname is designated, itis possible to cause a connection failure when a localhost is used for the address to connect at the client. It is necessary to input correct address of the server host in order to connect to client server.
- Setup when there are several LAN cards (NIC) are attached.
int Proud::CStartServerParameterBase::m_netWorkerThreadCount |
ProudNet has a thread that deals with internal I/O. This value designates how many for this.
- If it is 0 then it is regarded as the number of CPU cores.
- In case when the server where Proudnet to be working works as many as the number of CPU cores within a machine, it is reasonable to say that the server is one thread base. If this is the case, it is ideal to set this value as 1 to use 1 CPU in order to increase the CPU's overall efficiency.
- If this is not the case, then it is ideal to leave the value as it is.
Guid Proud::CStartServerParameterBase::m_protocolVersion |
This is a protocaol version that syncs the servers and the clients.
- When a client with different protocol version to ther server attempt to connect(CNetClient.Connect), the client will trigger ErrorType_ProtocolVersionMismatch.
int Proud::CStartServerParameterBase::m_reservedHostIDCount |
It is the number of HostID in the reserved range that are going to be used for P2P group creation. Start value must be set as m_reservedHostIDFirstValue.
HostID Proud::CStartServerParameterBase::m_reservedHostIDFirstValue |
This is the starting value of HostID within the reserved range to be used in generation of a P2P group. The size of the range should be set with m_reservedHostIDCount.
- The HostID of the clients is generated by avoiding the reserved range.
- By inserting the value within this reserved range in CreateP2PGroup(), you can create a P2P group with the HostID value wanted by the user.
String Proud::CStartServerParameterBase::m_serverAddrAtClient |
This is a server address.
- The initial vlaue is an empty string.
- It is usual to designate an empty value for this but it is necessary to input either the host name of the server or IP address when the server is working behind an L4 switch or an Internet router(NAT) for the clients to recognize.
- Use another public IP address or domain name of this server itself, not of your Load Balancer. If you don't, auto connection recovery may not work well.
- An IP address (e.g. 111.111.111.111) or a recognizable name (www.mydomain.com) can be used, but not the port number
int Proud::CStartServerParameterBase::m_threadCount |
The number of treads in thread pool. It must be at least bigger than 1.
- The initial value is 0. If 0 is designated, then it is to be disignated as the number of CPUs.
- When you set m_externalUserWorkerThreadPool then this value is ignored.
void* Proud::CStartServerParameterBase::m_timerCallbackContext |
This is a user data used as an index when the server calls back each time in every period. This value is to be input as an index when Proud.INetServerEvent.OnTimerCallback is called. A function described in Managing Timer loop RMI Event from server.
- The default value is NULL.
uint32_t Proud::CStartServerParameterBase::m_timerCallbackIntervalMs |
This sets the period of timer callback. A function described in Managing Timer loop RMI Event from server. When this is activated, INetServerEvent.OnTimerCallback will be called at every period set by millisecond unit.
- Ther is no callback when this is set as 0.
- The default value is 0
int32_t Proud::CStartServerParameterBase::m_timerCallbackParallelMaxCount |
It determines whether timer callback can be called in how many user worker threads simultaneously. The default value is 1. If you want to use all user worker threads, you may enter INT_MAX.