This page has been translated automatically.
Programming
Fundamentals
Setting Up Development Environment
Usage Examples
UnigineScript
C++
C#
UUSL (Unified UNIGINE Shader Language)
File Formats
Rebuilding the Engine and Tools
GUI
Double Precision Coordinates
API
Containers
Common Functionality
Controls-Related Classes
Engine-Related Classes
Filesystem Functionality
GUI-Related Classes
Math Functionality
Node-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
CIGI Client Plugin
Rendering-Related Classes
Warning! This version of documentation is OUTDATED, as it describes an older SDK version! Please switch to the documentation for the latest SDK version.
Warning! This version of documentation describes an old SDK version which is no longer supported! Please upgrade to the latest SDK version.

engine.syncker Functions

Notice
Syncker plugin must be loaded.

This class represents Syncker manager interface used to initialize and destroy Syncker in master and slave applications.

SynckerInterface Class

Members


int engine.syncker.getArgIsMaster()

Returns a value indicating if the command line argument "-sync_master" equals to 1.

Return value

1 if the command line argument "-sync_master" equals to 1; otherwise, 0.

string engine.syncker.getArgMasterBroadcast()

Returns the master's broadcast address specified by the command line argument "-sync_broadcast_address".

Return value

Master's broadcast address. The default value is 127.255.255.255

string engine.syncker.getArgSlaveName()

Returns the slave name set by the command line argument "-sync_slave_name". The default name is slave.

Return value

Slave name.

int engine.syncker.getArgUdpPort()

Returns the UDP port value set by the command line argument "-sync_udp_port".

Return value

UDP port number. The default value is 8890.

int engine.syncker.getArgTcpPort()

Returns the TCP port value set by the command line argument "-sync_tcp_port".

Return value

TCP port number. The default value is 8891.

int engine.syncker.getArgTcpPingPort()

Returns the TCP ping port value set by the command line argument "-sync_tcp_ping_port".

Return value

TCP ping port number. The default value is 8892.

MasterInterface engine.syncker.initMaster(string broadcast_address, int udp_port = 8890, int tcp_port = 8891, int tcp_ping_port = 8892, int compress_quality = COMPRESS_QUALITY_HIGH)

Initializes the Syncker in the master application using the given parameters.

Arguments

  • string broadcast_address - Broadcast address.
  • int udp_port - UDP port. The default value is 8890.
  • int tcp_port - TCP port. The default value is 8891.
  • int tcp_ping_port - TCP ping port. The default value is 8892.
  • int compress_quality - Compression quality. One of the COMPRESS_QUALITY_* values. The default value is COMPRESS_QUALITY_HIGH.

Return value

Master interface instance.

int engine.syncker.isMasterInitialized()

Returns a value indicating if the master was initialized.

Return value

1 if the master was initialized; otherwise, 0.

MasterInterface engine.syncker.getMaster()

Returns the master interface.

Return value

Master interface instance.

SlaveInterface engine.syncker.initSlave(string name, int udp_port = 8890, int tcp_port = 8891, int tcp_ping_port = 8892, int compress_quality = COMPRESS_QUALITY_HIGH)

Initializes the Syncker in the slave application using the given parameters.

Arguments

  • string name - Slave name.
  • int udp_port - UDP port. The default value is 8890.
  • int tcp_port - TCP port. The default value is 8891.
  • int tcp_ping_port - TCP ping port. The default value is 8892.
  • int compress_quality - Compression quality. One of the COMPRESS_QUALITY_* values. The default value is COMPRESS_QUALITY_HIGH.

Return value

Slave interface instance.

int engine.syncker.isSlaveInitialized()

Returns a value indicating if the slave was initialized.

Return value

1 if the slave was initialized; otherwise, 0.

SlaveInterface engine.syncker.getSlave()

Returns the slave interface.

Return value

Slave interface instance.

SynckerInterface engine.syncker.getSyncker()

Returns the syncker interface.

Return value

Syncker interface instance.

void engine.syncker.destroySyncker()

Performs shutdown and destroys the Syncker.
Notice
Called automatically, when the plugin is unloaded.

int engine.syncker.isSynckerInitialized()

Returns a value indicating if the Syncker (master or slave) was initialized.

Return value

1 if the Syncker (master or slave) was initialized; otherwise, 0.

int SYNCKER_TCP_PORT

Description

Default TCP port number: 8891.

int SYNCKER_TCP_PING_PORT

Description

Default TCP ping port number: 8892.

int SYNCKER_UDP_PORT

Description

Default UDP port number: 8890.

int SYNCKER_COMPRESS_QUALITY_NONE

Description

No compression is used.

int SYNCKER_COMPRESS_QUALITY_LOW

Description

Minimum LZ4 compression mode, works faster.

int SYNCKER_COMPRESS_QUALITY_HIGH

Description

Maximum LZ4 compression mode, works slower.
Last update: 2017-12-21
Build: ()