CRM64Pro GDK v0.11.0
A free cross-platform game development kit built on top of SDL 3.0
Loading...
Searching...
No Matches
Classes | Public Member Functions | List of all members

NetTCP class. More...

Inherits CRM64Pro::Base.

Classes

struct  ClientInfo
 Client information struct. More...
 

Public Member Functions

Sint32 info (Sint32 iMode=0)
 Request NetTCP Interface information.
 
Sint32 init (Uint8 iLM)
 Initialize the NetTCP system.
 
Sint32 close ()
 Close the NetTCP system.
 
Sint32 isServer ()
 Check if the server is running.
 
Sint32 isClient ()
 Check if the client is running.
 
Uint32 getIP ()
 Get the IP address.
 
Sint32 getClientName (string &sClientName)
 Get the client name.
 
Sint32 features (Sint32 iFeatures)
 Set or get advance features.
 
Sint32 createServer (Uint16 iPort, Sint32 iPasswd, Sint32 iDedicated)
 Create a server.
 
Sint32 setCoreServerCallback (Sint32(*myCoreServer)(void *pData, Sint32 iSize, void *pObj), void *pObj=nullptr)
 Set a callback function into the server thread for handling data.
 
Sint32 connectTo (const string &sHost, Uint16 iPort, const string &sClient, Uint32 iPasswd)
 Connect to a server.
 
Sint32 sendData (void *pData, Sint32 iSize, Uint8 bIsQuery=1)
 Send a data package (blocking method).
 
eNetMsg receiveData (void **pData, Uint32 *iSize)
 Receive a data package (non-blocking method).
 
Sint32 freeData (void *&buf)
 Free a received data package.
 
Sint32 queryKillServer ()
 Query to close the server (and all the connected clients).
 
Sint32 queryKillClient ()
 Query to kill this client.
 
Sint32 queryClientsInfo ()
 Query to get updated the information of all connected clients.
 
Sint32 getClientsInfo (ClientInfo **cinfo)
 Get information stored locally about all connected clients.
 
Sint32 setTimeOut (Sint32 iMs)
 Set the connection timeout.
 
Sint32 setSimDelay (Sint32 iMs, Sint32 iMode=0)
 Simulate a connection delay.
 

Detailed Description

NetTCP class.