Download the PHP package exodus4d/pathfinder_websocket without Composer

On this page you can find all versions of the php package exodus4d/pathfinder_websocket. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package pathfinder_websocket

WebSocket server for Pathfinder

Requirements

Install

  1. Checkout this project in a new folder e.g. /var/www/websocket.pathfinder
  2. Install Composer
  3. Install Composer dependencies from composer.json file:
    • $ cd /var/www/websocket.pathfinder
    • $ composer install
  4. Start WebSocket server $ php cmd.php

Configuration

Default

Clients (WebBrowser) listen for connections

(=> Your WebServer (e.g. Nginx) should proxy all WebSocket connections to this source)

TCP TcpSocket connection (Internal use for WebServer ⇄ WebSocket server communication)

(=> Where Pathfinder reaches the WebSocket server. This must match SOCKET_HOST, SOCKET_PORT options in environment.ini)

Start parameters [Optional]

The default configuration should be fine for most installations. You can change/overwrite the default Host and Port configuration by adding additional CLI parameters when starting the WebSocket server:

$ php cmd.php --wsHost [CLIENTS_HOST] --wsPort [CLIENTS_PORT] --tcpHost [TCP_HOST] --tcpPort [TCP_PORT] --debug 0

For example: If you want to change the the WebSocket port and increase debug output:

$ php cmd.php --wsPort 8030 --debug 3

--debug (default --debug 2)

Allows you to set log output level from 0 (silent) - errors are not logged, to 3 (debug) for detailed logging.

alt text

WebSocket UI

There is a WebSocket section on Pathinders /setup page. After the WebSocket server is started, you should check it if everything works. You see the most recent WebSocket log entries, the current connection state, the current number of active connections and all maps that have subscriptions

alt text

Log entry view. Depending on the --debug parameter, the most recent (max 50) entries will be shown:

alt text

Subscriptions for each map:

alt text

Unix Service (systemd)

New Service

It is recommended to wrap the cmd.php script in a Unix service, that over control the WebSocket server. This creates a systemd service on CentOS7:

  1. $ cd /etc/systemd/system
  2. $ vi websocket.pathfinder.service
  3. Copy script and adjust ExecStart and WorkingDirectory values:

Now you can use the service to start/stop/restart your WebSocket server

Auto-Restart the Service

You can automatically restart your service (e.g. on EVE-Online downtime). Create a new "timer" for the automatic restart.

  1. $ cd /etc/systemd/system (same dir as before)
  2. $ vi restart.websocket.pathfinder.timer
  3. Copy script:

Now we need a new "restart service" for the timer:

  1. $ cd /etc/systemd/system (same dir as before)
  2. $ vi restart.websocket.pathfinder.service
  3. Copy script:

And then, we need to either restart the machine or launch

Info


All versions of pathfinder_websocket with dependencies

PHP Build Version
Package Version
Requires php-64bit Version >=7.1
ext-json Version *
cboden/ratchet Version 0.4.x
react/promise-stream Version 1.2.*
clue/ndjson-react Version 1.1.*
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package exodus4d/pathfinder_websocket contains the following files

Loading the files please wait ....