• Stars
    star
    898
  • Rank 48,819 (Top 1.0 %)
  • Language
    PHP
  • License
    Other
  • Created almost 10 years ago
  • Updated 5 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

WebSocket client and server in PHP

Websocket Client and Server for PHP

Build Status Coverage Status

Archived project

This project has been archived and is no longer maintained. No bug fix and no additional features will be added.
You won't be able to submit new issues or pull requests, and no additional features will be added

This library has been replaced by sirn-se/websocket-php

Websocket Client and Server for PHP

This library contains WebSocket client and server for PHP.

The client and server provides methods for reading and writing to WebSocket streams. It does not include convenience operations such as listeners and implicit error handling.

Documentation

Installing

Preferred way to install is with Composer.

composer require textalk/websocket
  • Current version support PHP versions ^7.4|^8.0.
  • For PHP 7.2 and 7.3 support use version 1.5.
  • For PHP 7.1 support use version 1.4.
  • For PHP ^5.4 and 7.0 support use version 1.3.

Client

The client can read and write on a WebSocket stream. It internally supports Upgrade handshake and implicit close and ping/pong operations.

$client = new WebSocket\Client("ws://echo.websocket.org/");
$client->text("Hello WebSocket.org!");
echo $client->receive();
$client->close();

Server

The library contains a rudimentary single stream/single thread server. It internally supports Upgrade handshake and implicit close and ping/pong operations.

Note that it does not support threading or automatic association ot continuous client requests. If you require this kind of server behavior, you need to build it on top of provided server implementation.

$server = new WebSocket\Server();
$server->accept();
$message = $server->receive();
$server->text($message);
$server->close();

License and Contributors

ISC License

Fredrik Liljegren, Armen Baghumian Sankbarani, Ruslan Bekenev, Joshua Thijssen, Simon Lipp, Quentin Bellus, Patrick McCarren, swmcdonnell, Ignas Bernotas, Mark Herhold, Andreas Palm, Sรถren Jensen, pmaasz, Alexey Stavrov, Michael Slezak, Pierre Seznec, rmeisler, Nickolay V. Shmyrev, Christoph Kempen, Marc Roberts, Antonio Mora, Simon Podlipsky, etrinh.

More Repositories

1

jquery.jsonrpcclient.js

JSON-RPC 2.0 Client for HTTP and WebSocket backends
JavaScript
70
star
2

angular-schema-form-datepicker

Datepicker add-on for Angular Schema Form using pickadate!
JavaScript
43
star
3

contentful-static

Simple static site generator backed by contenful API
JavaScript
22
star
4

json-rpc-client-ruby

Asynchronous (EventMachine) JSON-RPC 2.0 over HTTP client.
Ruby
17
star
5

angular-schema-form-colorpicker

Colorpicker add-on for Angular Schema Form using spectrum colorpicker.
JavaScript
11
star
6

apilapse

Issue tracking kanban-like angularjs based frontend for API-backends like redmine, github etc
JavaScript
8
star
7

angular-schema-form-base64-file-upload

Simple asf add-on to upload files as base64
JavaScript
5
star
8

angular-schema-form-fontpicker

Fontpicker add-on for schema form
JavaScript
5
star
9

queuemailerl

Dispatches emails from a RabbitMQ queue to multiple SMTP servers
Erlang
5
star
10

tx-tinymce

AngularJS directive for TinyMCE
JavaScript
5
star
11

angular-schema-form-tinymce

Tiny add-on for Angular Schema Form for wysiwyg html editing.
JavaScript
4
star
12

poppler

C++
4
star
13

angular-schema-form-callout

Bootstrap Callout add-on for Angular Schema Form.
JavaScript
4
star
14

tinymce-image-plugin

Customized version of the internal TinyMCE Image plugin which also sets margins and floats.
JavaScript
3
star
15

bootlint-gui

A simple browser interface for the Bootstrap linter Bootlint
JavaScript
2
star
16

textalk-webshopclient-php

PHP Client for Textalk Webshop API
PHP
2
star
17

prerender-ba-fs-cache

File cache for prerender that always returns served files, and sometimes rebuilds the cached value.
JavaScript
2
star
18

api-integration-php

Client API for integration with Payson payment service provider
PHP
2
star
19

simpledom

Wrappers around PHP SimpleXml and DOM to make working with these classes a bit easier. This is a fork of https://code.google.com/p/simpledom/
PHP
2
star
20

imperial

Library for rendering mustache templates in Erlang
Erlang
1
star
21

queuepusherl

Improvement on queuemailer with support for pushing updates to HTTP servers.
Erlang
1
star
22

event-store-promise

Wraps event-store-client with promises and streams
JavaScript
1
star
23

xJsonRpc-PHP

A JSON-RPC 2.0 client/server library for PHP
PHP
1
star
24

esp-mysql-rabbit

Event Store Promises/Streams using MySQL and Rabbit as eventstore
JavaScript
1
star
25

quazip

C++
1
star