Download the PHP package ekstazi/websocket-common without Composer

On this page you can find all versions of the php package ekstazi/websocket-common. 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 websocket-common

websocket-common

Base stream interfaces for client and server websocket implementations

Installation

This package can be installed as a Composer dependency.

composer require ekstazi/websocket-common

Requirements

PHP 7.2+

Interfaces

Three interfaces provided

interface Reader extends InputStream

Methods

read(): Promise<string>

Reads data from the stream. Return Promise that resolves with a string when new data is available or null if the stream has closed.

interface Writer extends OutputStream

Constants

const MODE_BINARY = "binary"

Send data as binary frames. This mode used by default.

const MODE_TEXT = 'text'

Send data as utf-8 text frames.

Methods

public function setDefaultMode(string $mode): void

Set default mode to write frames.

public function getDefaultMode(): string

Get current default write mode.

public function write(string $data, string $mode = null): Promise<int>

Write data with specified write mode. By default value Writer::getMode() used. Return promise that resolves with number of bytes written

public function end(string $finalData = "", string $mode = null): Promise

Marks the stream as no longer writable. Optionally writes a final data chunk before. Note that this is not the same as forcefully closing the stream. This method waits for all pending writes to complete before closing the stream. Socket streams implementing this interface should only close the writable side of the stream.

interface Connection extends Reader, Writer


All versions of websocket-common with dependencies

PHP Build Version
Package Version
Requires php Version >=7.2
amphp/byte-stream Version ^1.7
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 ekstazi/websocket-common contains the following files

Loading the files please wait ....