ProudNet: Server and Network

Please refer to ProudNet : Server and Network for description of this module. More...

Classes

class  Proud::CRemoteOfflineEventArgs
 
class  Proud::CRemoteOnlineEventArgs
 
struct  Proud::AddrPort
 
struct  Proud::NamedAddrPort
 
class  Proud::CNetUtil
 
class  Proud::CNetConnectionParam
 
class  Proud::ErrorInfo
 
class  Proud::HostIDArray
 
class  Proud::HostIDSet
 
class  Proud::INetClientEvent
 
class  Proud::CUserWorkerThreadCallbackContext
 
class  Proud::INetCoreEvent
 
class  Proud::INetServerEvent
 
class  Proud::IRmiHost
 ProudNet Network host interface that is referred by RMI. User does not have to use this class directly. More...
 
class  Proud::CClientWorkerInfo
 Structure that contain information of clientWorker. More...
 
class  Proud::CSocketInfo
 Structure that contain information of socket. More...
 
class  Proud::CThreadInfo
 Construct contains information of 1 thread. More...
 
class  Proud::CApplicationHint
 user program to engine More...
 
class  Proud::ReliableUdpHostStats
 statistics information. For debugging or performance test More...
 
class  Proud::CTestStats
 
class  Proud::CTestStats2
 
class  Proud::CDisconnectArgs
 
class  Proud::IRmiProxy
 
class  Proud::IRmiStub
 
class  Proud::CMessage
 
class  Proud::CSmallStackAllocMessage
 
class  Proud::MessageSummary
 
class  Proud::AfterRmiSummary
 
class  Proud::CNetClientInfo
 
class  Proud::CFrameMoveResult
 client FrameMove process result More...
 
class  Proud::CServerConnectionState
 Acquired result of the connection status to server. More...
 
class  Proud::CDirectP2PInfo
 Information that contains addresses and others for internal P2P communication in ProudNet. Used at CNetClient.GetDirectP2PInfo and so on. More...
 
class  Proud::CNetClient
 Network Client. More...
 
class  Proud::CNetConfig
 
class  Proud::CNetPeerInfo
 
struct  Proud::SuperPeerRating
 Each element of array filled at GetSuitableSuperPeerRankListInGroup. More...
 
class  Proud::CSuperPeerSelectionPolicy
 super peer selection policy More...
 
class  Proud::CP2PConnectionStats
 Statistics to P2P connection. More...
 
class  Proud::CP2PPairConnectionStats
 Number of attempt and success Udp messaging between RemoteA and Remote B. More...
 
class  Proud::CNetServer
 Gaming network server. More...
 
class  Proud::CStartServerParameter
 
class  Proud::CServiceParameter
 
class  Proud::CNTServiceStartParameter
 
class  Proud::CP2PGroup
 
class  Proud::CP2PGroups
 
class  Proud::CP2PGroupOption
 
class  Proud::RmiContext
 
class  Proud::OverlappedResult
 
class  Proud::SocketSelectContext
 
class  Proud::ISocketDelegate
 
class  Proud::CSocket
 
class  Proud::CStartServerParameterBase
 
class  Proud::IThreadPoolEvent
 
class  Proud::CThreadPool
 

Typedefs

typedef uint16_t Proud::RmiID
 
typedef RefCount< ErrorInfo > Proud::ErrorInfoPtr
 
typedef RefCount< CP2PGroup > Proud::CP2PGroupPtr
 

Enumerations

enum  Proud::SocketErrorCode {
  SocketErrorCode_Ok = 0, SocketErrorCode_Error = SOCKET_ERROR, SocketErrorCode_Timeout = WSAETIMEDOUT, SocketErrorCode_ConnectionRefused = WSAECONNREFUSED,
  SocketErrorCode_ConnectResetByRemote = WSAECONNRESET, SocketErrorCode_AddressNotAvailable = WSAEADDRNOTAVAIL, SocketErrorCode_NotSocket = WSAENOTSOCK, SocketErrorCode_ShutdownByRemote = WSAEDISCON,
  SocketErrorCode_WouldBlock = WSAEWOULDBLOCK, SocketErrorCode_IoPending = WSA_IO_PENDING, SocketErrorCode_AccessError = WSAEACCES, SocketErrorCode_OperationAborted = ERROR_OPERATION_ABORTED,
  SocketErrorCode_InvalidArgument = WSAEINVAL, SocketErrorCode_Intr = WSAEINTR, SocketErrorCode_InProgress = WSAEINPROGRESS, SocketErrorCode_AlreadyIsConnected = WSAEISCONN,
  SocketErrorCode_AlreadyAttempting = WSAEALREADY, SocketErrorCode_Cancelled = WSAECANCELLED, SocketErrorCode_NetUnreachable = WSAENETUNREACH
}
 
enum  ShutdownFlag { ShutdownFlag_Send = SD_SEND, ShutdownFlag_Receive = SD_RECEIVE, ShutdownFlag_Both = SD_BOTH }
 
enum  Proud::CompressMode { Proud::CM_None, Proud::CM_Zip }
 
enum  Proud::EncryptMode { Proud::EM_None, Proud::EM_Secure, Proud::EM_Fast, EM_LAST }
 
enum  Proud::MessagePriority {
  Proud::MessagePriority_Ring0 = 0, Proud::MessagePriority_Ring1, Proud::MessagePriority_High, Proud::MessagePriority_Medium,
  Proud::MessagePriority_Low, Proud::MessagePriority_Ring99, Proud::MessagePriority_LAST
}
 
enum  MessageReliability { MessageReliability_Unreliable = 0, MessageReliability_Reliable, MessageReliability_LAST }
 
enum  Proud::ErrorType {
  Proud::ErrorType_Ok = 0, Proud::ErrorType_Unexpected, Proud::ErrorType_AlreadyConnected, Proud::ErrorType_TCPConnectFailure,
  Proud::ErrorType_InvalidSessionKey, Proud::ErrorType_EncryptFail, Proud::ErrorType_DecryptFail, Proud::ErrorType_ConnectServerTimeout,
  Proud::ErrorType_ProtocolVersionMismatch, Proud::ErrorType_NotifyServerDeniedConnection, Proud::ErrorType_ConnectServerSuccessful, Proud::ErrorType_DisconnectFromRemote,
  Proud::ErrorType_DisconnectFromLocal, Proud::ErrorType_DangerousArgumentWarning, Proud::ErrorType_UnknownAddrPort, Proud::ErrorType_ServerNotReady,
  Proud::ErrorType_ServerPortListenFailure, Proud::ErrorType_AlreadyExists, Proud::ErrorType_PermissionDenied, Proud::ErrorType_BadSessionGuid,
  Proud::ErrorType_InvalidCredential, Proud::ErrorType_InvalidHeroName, Proud::ErrorType_LoadDataPreceded, Proud::ErrorType_AdjustedGamerIDNotFilled,
  Proud::ErrorType_NoHero, Proud::ErrorType_UnitTestFailed, Proud::ErrorType_P2PUdpFailed, Proud::ErrorType_ReliableUdpFailed,
  Proud::ErrorType_ServerUdpFailed, Proud::ErrorType_NoP2PGroupRelation, Proud::ErrorType_ExceptionFromUserFunction, Proud::ErrorType_UserRequested,
  Proud::ErrorType_InvalidPacketFormat, Proud::ErrorType_TooLargeMessageDetected, Proud::ErrorType_CannotEncryptUnreliableMessage, Proud::ErrorType_ValueNotExist,
  Proud::ErrorType_TimeOut, Proud::ErrorType_LoadedDataNotFound, Proud::ErrorType_SendQueueIsHeavy, Proud::ErrorType_TooSlowHeartbeatWarning,
  Proud::ErrorType_CompressFail, Proud::ErrorType_LocalSocketCreationFailed, Proud::Error_NoneAvailableInPortPool, Proud::ErrorType_InvalidPortPool,
  Proud::ErrorType_InvalidHostID, Proud::ErrorType_MessageOverload, Proud::ErrorType_DatabaseAccessFailed, Proud::ErrorType_OutOfMemory,
  Proud::ErrorType_AutoConnectionRecoveryFailed
}
 
enum  Proud::HostID { Proud::HostID_None = 0, Proud::HostID_Server = 1, Proud::HostID_Last = 2 }
 
enum  _RmiID { RmiID_None = 0, RmiID_Last = 65535 }
 
enum  Proud::LogCategory { Proud::LogCategory_System, Proud::LogCategory_Tcp, Proud::LogCategory_Udp, Proud::LogCategory_P2P }
 
enum  Proud::HackType { Proud::HackType_None, Proud::HackType_SpeedHack, Proud::HackType_PacketRig }
 
enum  Proud::ConnectionState { Proud::ConnectionState_Disconnected, Proud::ConnectionState_Connecting, Proud::ConnectionState_Connected, Proud::ConnectionState_Disconnecting }
 
enum  Proud::FallbackMethod { Proud::FallbackMethod_None, Proud::FallbackMethod_PeersUdpToTcp, Proud::FallbackMethod_ServerUdpToTcp, Proud::FallbackMethod_CloseUdpSocket }
 
enum  Proud::DirectP2PStartCondition { Proud::DirectP2PStartCondition_Jit, Proud::DirectP2PStartCondition_Always, DirectP2PStartCondition_LAST }
 
enum  Proud::MiniDumpAction { Proud::MiniDumpAction_None = 0, Proud::MiniDumpAction_DoNothing, Proud::MiniDumpAction_AlarmCrash }
 
enum  Proud::ServerUdpAssignMode { Proud::ServerUdpAssignMode_None, Proud::ServerUdpAssignMode_PerClient, Proud::ServerUdpAssignMode_Static }
 
enum  SocketType { SocketType_Tcp, SocketType_Udp, SocketType_Raw }
 

Functions

void Proud::AppendTextOut (String &a, AddrPort &b)
 
void Proud::AppendTextOut (String &a, NamedAddrPort &b)
 
PROUD_API const PNTCHAR * Proud::ToString (LogCategory logCategory)
 
PROUD_API const PNTCHAR * Proud::ToString (ConnectionState val)
 

Variables

const int Proud::InvalidSocket = 0
 
StringA Proud::policyFileText
 
const PNTCHAR * Proud::ProxyBadSignatureErrorText
 
const PNTCHAR * Proud::DecryptFailedError
 

Detailed Description

Please refer to ProudNet : Server and Network for description of this module.

Typedef Documentation

typedef RefCount<ErrorInfo> Proud::ErrorInfoPtr

Smart pointer of the object that contains error info

  • ErrorInfoPtr does not use fast alloc since it does not exist often

Enumeration Type Documentation

Compression mode

Enumerator
CM_None 

Do not compress

CM_Zip 

Compress with ZIP algorism

Connection status with other hosts

Enumerator
ConnectionState_Disconnected 

Disconnected condition

ConnectionState_Connecting 

Tried connecting but result is unknown

ConnectionState_Connected 

Succeed to connect

ConnectionState_Disconnecting 

Disconnecting is in progress

Conditions to start hole-punching for direct P2P communication among clients

Enumerator
DirectP2PStartCondition_Jit 

Unless really needed, it is recommended not to do hole-punching. Using this is strongly recommended.

DirectP2PStartCondition_Always 

This forcefully begins hole-punching at the moment when P2P communication among clients is allowed by CNetServer.CreateP2PGroup or CNetServer.JoinP2PGroup or others. For an example, if there is a need to change super peer at P2P Networking for Super Peer (Super Peer or host) during game play, this may be needed.

Setup value of encryption and decryption

Enumerator
EM_None 

Do not encrypt

EM_Secure 

Do encryption that mixture with RSA and AES. Do not use with secure message such as logon

EM_Fast 

Do encryption that mixture with RSA and Fast. Encryption is required like moving character but please consider about performance.

TODO:translate needed.

Enumerator
ErrorType_Ok 

TODO:translate needed.

ErrorType_Unexpected 

TODO:translate needed.

ErrorType_AlreadyConnected 

TODO:translate needed.

ErrorType_TCPConnectFailure 

TODO:translate needed.

ErrorType_InvalidSessionKey 

TODO:translate needed.

ErrorType_EncryptFail 

TODO:translate needed.

ErrorType_DecryptFail 

TODO:translate needed.

ErrorType_ConnectServerTimeout 

TODO:translate needed.

ErrorType_ProtocolVersionMismatch 

TODO:translate needed.

ErrorType_NotifyServerDeniedConnection 

TODO:translate needed.

ErrorType_ConnectServerSuccessful 

TODO:translate needed.

ErrorType_DisconnectFromRemote 

TODO:translate needed.

ErrorType_DisconnectFromLocal 

TODO:translate needed.

ErrorType_DangerousArgumentWarning 

TODO:translate needed.

ErrorType_UnknownAddrPort 

TODO:translate needed.

ErrorType_ServerNotReady 

TODO:translate needed.

ErrorType_ServerPortListenFailure 

TODO:translate needed.

ErrorType_AlreadyExists 

TODO:translate needed.

ErrorType_PermissionDenied 

Access denied.

ErrorType_BadSessionGuid 

TODO:translate needed.

ErrorType_InvalidCredential 

TODO:translate needed.

ErrorType_InvalidHeroName 

TODO:translate needed.

ErrorType_LoadDataPreceded 

TODO:translate needed.

ErrorType_AdjustedGamerIDNotFilled 

TODO:translate needed.

ErrorType_NoHero 

TODO:translate needed.

ErrorType_UnitTestFailed 

Unit test failed

ErrorType_P2PUdpFailed 

TODO:translate needed.

ErrorType_ReliableUdpFailed 

TODO:translate needed.

ErrorType_ServerUdpFailed 

TODO:translate needed.

ErrorType_NoP2PGroupRelation 

TODO:translate needed.

ErrorType_ExceptionFromUserFunction 

TODO:translate needed.

ErrorType_UserRequested 

TODO:translate needed.

ErrorType_InvalidPacketFormat 

TODO:translate needed.

ErrorType_TooLargeMessageDetected 

TODO:translate needed.

ErrorType_CannotEncryptUnreliableMessage 

TODO:translate needed.

ErrorType_ValueNotExist 

TODO:translate needed.

ErrorType_TimeOut 

TODO:translate needed.

ErrorType_LoadedDataNotFound 

TODO:translate needed.

ErrorType_SendQueueIsHeavy 

TODO:translate needed. Warning function for traffic overload

ErrorType_TooSlowHeartbeatWarning 

TODO:translate needed.

ErrorType_CompressFail 

TODO:translate needed.

ErrorType_LocalSocketCreationFailed 

Unable to start listening of client socket. Must check if either TCP or UDP socket is already in use.

Error_NoneAvailableInPortPool 

Failed binding to local port that defined in Port Pool. Please check number of values in Port Pool are sufficient.

ErrorType_InvalidPortPool 

Range of user defined port is wrong. Set port to 0(random port binding) or check if it is overlaped.

ErrorType_InvalidHostID 

Invalid HostID.

ErrorType_MessageOverload 

The speed of stacking messages are higher than the speed of processing them. Check that you are sending too many messages, or your message processing routines are running too slowly.

ErrorType_DatabaseAccessFailed 

Accessing database failed. For example, query statement execution failed. You may see the details from comment variable.

ErrorType_OutOfMemory 

Out of memory.

ErrorType_AutoConnectionRecoveryFailed 

서버와의 연결이 끊어져서 연결 복구 기능이 가동되었지만, 이것 마저도 실패했습니다.

How to intentially use TCP fallback

Enumerator
FallbackMethod_None 

No Fallback. In other words, UDP communication to both server and peer are in use.

FallbackMethod_PeersUdpToTcp 

Regards that UDP with server is sustained but UDP with other peers to be disconnected. Reproduce a circumstance similar to a temporary port mapping failure. This is the lowest option with weakest impact.

FallbackMethod_ServerUdpToTcp 

Regards that UDP with server is disconnected. Reproduce a circumstance similar to a temporary port mapping failure. On top of that, it also disconnects UDP with peers. Intermediate impact.

FallbackMethod_CloseUdpSocket 

All UDP sockets of client will be shut down. UDP restoration will never be possible. Strongest impact.

Type of hacking

Enumerator
HackType_None 

No hacking

HackType_SpeedHack 

Speek hack

HackType_PacketRig 

Handle packet

TODO:translate needed.

Enumerator
HostID_None 

None

HostID_Server 

Server

HostID_Last 

(Do not use it)

It is a category type of the log occurred within the module.

Enumerator
LogCategory_System 

Basic System

LogCategory_Tcp 

Relevant to TCP communication

LogCategory_Udp 

Relevant to UDP communication

LogCategory_P2P 

Relevant to P2P communication

TODO:translate needed.

Enumerator
MessagePriority_Ring0 

TODO:translate needed.

MessagePriority_Ring1 

TODO:translate needed.

MessagePriority_High 

TODO:translate needed.

MessagePriority_Medium 

TODO:translate needed.

MessagePriority_Low 

TODO:translate needed.

MessagePriority_Ring99 

TODO:translate needed.

MessagePriority_LAST 

TODO:translate needed.

Mini Dump Type

Enumerator
MiniDumpAction_None 

It is a general program.

MiniDumpAction_DoNothing 

In case of mini dump file creation by user calling.

MiniDumpAction_AlarmCrash 

In case of mini dump file creation by crash.

This is a policy allocating UDP sockets to be used by the serverwhen communicating with the clients. Please refer Method of using Server UDP Port for more details.

Enumerator
ServerUdpAssignMode_None 

Not designated. Users are not to use this value.

ServerUdpAssignMode_PerClient 

For each clients that coonects, it is to use different UDP port for each of them.

ServerUdpAssignMode_Static 
    All the clients that connect reuse the UDP ports that are already prepared.
    When using this option, it is possible to cause some clients hard to communicate with the server due to UDP characteristics.
    - This is option is prepared for the lower compatibility of Proudnet and it is not recommended to use.
    - It is necessary to use a firewall setup to use this feature. Please refer <a target="_blank" href="http://guide.nettention.com/cpp_en#block_icmp" >Firewall setup for ICMP related

for more details. This value affects Proud.CStartServerParameter.m_udpPorts also.

Socket Error Code