My Project
Static Public Member Functions | List of all members
ParaScripting::ParaNetwork Class Reference

API wrapper for NPL Network Layer functions. More...

#include <ParaScriptingNetwork.h>

Static Public Member Functions

static void EnableNetwork (bool bEnable, const char *CenterName, const char *password)
 Enable the network, by default the network layer is disabled. More...
 
static bool IsNetworkLayerRunning ()
 whether network layer is running or not. More...
 
static void SetNerveCenterAddress (const char *pAddress)
 set the IP and port for the nerve center: call this function before you enable the network (EnableNetwork) for it to take effect. More...
 
static void SetNerveReceptorAddress (const char *pAddress)
 set the IP and port for the nerve receptor: call this function before you enable the network (EnableNetwork) for it to take effect. More...
 

Detailed Description

API wrapper for NPL Network Layer functions.

Member Function Documentation

§ EnableNetwork()

void ParaScripting::ParaNetwork::EnableNetwork ( bool  bEnable,
const char *  CenterName,
const char *  password 
)
static

Enable the network, by default the network layer is disabled.

calling this function multiple time with different CenterName will restart the network layer with a different center name.

Parameters
bEnabletrue to enable, false to disable.If this is false, the CenterName and Password are ignored.
CenterNamethe local nerve center name. it is also the user name which local receptor will use in the credentials to login in other NPL runtime.
Password
Returns
true if succeeded.

§ IsNetworkLayerRunning()

bool ParaScripting::ParaNetwork::IsNetworkLayerRunning ( )
static

whether network layer is running or not.

Returns

§ SetNerveCenterAddress()

void ParaScripting::ParaNetwork::SetNerveCenterAddress ( const char *  pAddress)
static

set the IP and port for the nerve center: call this function before you enable the network (EnableNetwork) for it to take effect.

Parameters
pAddresssuch as "127.0.0.1:60001", or ":60001" (if you want to use any available IP on the computer)

§ SetNerveReceptorAddress()

void ParaScripting::ParaNetwork::SetNerveReceptorAddress ( const char *  pAddress)
static

set the IP and port for the nerve receptor: call this function before you enable the network (EnableNetwork) for it to take effect.

Parameters
pAddresssuch as "127.0.0.1:60000", or ":60000" (if you want to use any available IP on the computer)

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