Command-line interface tools

Command-line interface tools explained

Found in <package-root>/.Runtime/<platform>/.

Replication Server

replication-server --help serve

      --port=32001                                  The port to listen to.
      --stats-port=32000                            The port to listen for stats scrapers. Also enables pprof.
      --use-p-prof                                  If StatsPort is 0 then setup pprof on port 6060.
      --dump                                        Write network packets to capture files (.packets).
      --dump-reverse                                Write network packets reversing in and out packets
      --frequency=20                                [Obsolete] use SendFrequency instead.
      --send-frequency=20                           The server send frequency.
      --recv-frequency=60                           The server packet receive frequency packets/s. Packets received faster than this will be dropped and the connection throttled.
      --schema=STRING                               The schema file (.schema).
      --disconnect-timeout=5000                     Disconnect timeout (in milliseconds).
      --debug-streams                               Use debug streams.
      --max-entities=65536                          Maximum number of entities allowed.
      --max-clients=200                             Expected maximum number of clients.
      --min-query-distance=0.1                      Minimum distance for query change.
      --web-support                                 [Deprecated] Does this support web connections.
      --public-ip=STRING                            Public IP of the replication server, used by webrtc.
      --web-port=32003                              Port for webrtc, only used if --web-support is true
      --signalling-port=32002                       Port for signalling, only used if --web-support is true
      --out-stats-freq=1                            Frequency, in seconds, of updates to prometheus stats
      --log-stats-freq=0                            Frequency, in seconds, of output of stats to INFO logs. 0 - no output
      --env="prod"                                  Environment in which the server is executed
      --secret="local-development"                  Secret used for API request and client authentication. The default value is used during local development only.
      --project-id="local"                          ID of the project as assigned by the portal.
      --persistence-enabled                         If enabled, starts replication server with persistence attached.
      --persistence-save-file-name="world.save"     The name of the persistent save file.
      --persistence-save-folder="."                 The folder where the save file is written.
      --persistence-save-frequency=30               The frequency in which the save file is written (in seconds).
      --persistence-query-world-position="0,0,0"    Position of the center of the entity query.
      --persistence-query-radius=10000              Radius of entity query.
      --persistence-disable-s-3-storage             Enable to disable storing to S3.
      --persistence-upload-size-threshold=1024      Difference in bytes to cause an s3 upload.
      --persistence-upload-frequency-forced=3600    The maximum number of seconds between forced s3 uploads.

To start the Server, you need to give it the location of the schema.

circle-info

You can copy the CLI commands to start the replication server form coherence Hub > Servers tab_._

__

You can also define other parameters like min-query-distance (the minimum distance the LiveQuery needs to move for the Replicator to recognize a change), send and receive frequency, ip and port number.

Minimal parameters set is presented in the example below:

replication-server serve --port 32001 --signalling-port 32002 --send-frequency 20 --recv-frequency 60 --web-support --env dev --schema "/Users/coherence/unity/Coherence.Toolkit/Toolkit.schema,/Users/coherence/MyProject/Library/coherence/Gathered.schema"

replication-server --help listen

Last updated

Was this helpful?