CMSDK  2.0.1
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
cmlabs::NetworkManager Class Reference
Inheritance diagram for cmlabs::NetworkManager:
cmlabs::Runnable

Public Member Functions

THREAD_RET THREAD_FUNCTION_CALL NetworkManagerRun (THREAD_ARG arg)
 
bool setSSLCertificate (const char *sslCertPath, const char *sslKeyPath)
 
NetworkChannelcreateListener (uint16 port, uint8 encryption, uint8 protocol, bool isAsync, uint32 protocolTimeout, bool isDefaultProtocol, uint32 channelID, NetworkReceiver *recv)
 
NetworkChannelcreateTCPConnection (const char *addr, uint16 port, uint8 encryption, uint8 protocol, bool isAsync, bool autoreconnect, uint32 channelID, NetworkReceiver *recv, uint64 &conid, uint64 &location, uint32 timeoutMS=5000)
 
NetworkChannelcreateTCPConnection (uint64 location, uint8 encryption, uint8 protocol, bool isAsync, bool autoreconnect, uint32 channelID, NetworkReceiver *recv, uint64 &conid, uint32 timeoutMS=5000)
 
NetworkChannelcreateTCPConnection (const uint32 *addresses, uint16 addressCount, uint16 port, uint8 encryption, uint8 protocol, bool isAsync, bool autoreconnect, uint32 channelID, NetworkReceiver *recv, uint64 &conid, uint64 &location, uint32 timeoutMS=5000)
 
NetworkChannelcreateUDPConnection (uint16 port, uint8 protocol, bool isAsync, bool autoreconnect, uint32 channelID, NetworkReceiver *recv, uint64 &conid)
 
NetworkChanneladdTCPConnection (const char *addr, uint16 port, uint8 encryption, uint8 protocol, bool isAsync, uint32 channelID, NetworkReceiver *recv, uint64 &conid, uint64 &location, uint32 timeoutMS=5000, const char *greetingData=NULL, uint32 greetingSize=0)
 
NetworkChanneladdTCPConnection (uint64 location, uint8 encryption, uint8 protocol, bool isAsync, uint32 channelID, NetworkReceiver *recv, uint64 &conid, uint32 timeoutMS=5000, const char *greetingData=NULL, uint32 greetingSize=0)
 
bool stopListener (uint16 port, uint8 protocol)
 
bool endConnection (uint64 conid)
 
bool endUDPConnection (uint16 port)
 
uint8 getConnectionType (uint64 conid)
 
uint64 getRemoteAddress (uint64 conid)
 
NetworkChannelgetConnection (uint64 conid)
 
NetworkChannelgetTCPConnectionByPort (uint16 port)
 
NetworkChannelgetUDPConnectionByPort (uint16 port)
 
uint64 addConnection (NetworkChannel *channel)
 
bool sendUDPMessage (DataMessage *msg, uint64 destination)
 
HTTPReplymakeHTTPRequest (const char *url, uint32 timeout, const char *content=NULL, uint32 contentSize=0)
 
HTTPReplymakeHTTPRequest (HTTPRequest *req, const char *addr, uint16 port, uint8 encryption, uint32 timeout)
 
- Public Member Functions inherited from cmlabs::Runnable
virtual bool stop (uint32 timeout=200)
 

Static Public Member Functions

static bool UnitTest ()
 
static bool UnitTestDelayedConnect ()
 
static bool UnitTestHTTP ()
 
static bool TestHTTP (const char *host, uint32 port, std::vector< std::string > &urls)
 

Protected Member Functions

bool run ()
 

Protected Attributes

std::map< uint32, NetworkChannel * > channels
 
std::map< uint64, NetworkChannel * > channelsByConnection
 
std::map< uint16, NetworkChannel * > listeners
 
std::map< uint16, NetworkChannel * > udpListeners
 
std::string sslCertPath
 
std::string sslKeyPath
 
UDPConnectionudpOutputCon
 
utils::Mutex udpOutputConMutex
 
uint32 lastChannelID
 
uint64 lastConnectionID
 
- Protected Attributes inherited from cmlabs::Runnable
uint32 threadID
 
bool shouldContinue
 
bool isRunning
 

Friends

class NetworkChannel
 

The documentation for this class was generated from the following files: