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_allowOnExceptionCallback |
- 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 encryption function.
- Generally, It had better turn on encryption function. But it takes lots of server’s operation time to exchange security key when connecting to server.
- If the game server does not need encryption function, it had better turn it off.
- 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 and the P2P message will be sent as not-encrypted RMI.
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 |
TODO:translate needed. It is the start value of HostID whose range was reserved for P2P Group creation. Need to set the size of range as m_reservedHostIDCount.
- HostIDs of clients that are about to be connected must be created beyond the reserved range.
- P2P group that has HostID value that a user wants can be created by inserting the value (in the reserved range) into CreateP2PGroup().
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.
- 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 |