The Hoa\Websocket library.

Overview

Hoa


Build status Code coverage Packagist License

Hoa is a modular, extensible and structured set of PHP libraries.
Moreover, Hoa aims at being a bridge between industrial and research worlds.

Hoa\Websocket

Help on IRC Help on Gitter Documentation Board

This library allows to manipulate the WebSocket protocol and proposes a server and a client. It supports two specifications RFC6455 and Hybi (at the same time).

Learn more.

Installation

With Composer, to include this library into your dependencies, you need to require hoa/websocket:

$ composer require hoa/websocket '~3.0'

For more installation procedures, please read the Source page.

Testing

Before running the test suites, the development dependencies must be installed:

$ composer install

Then, to run all the test suites:

$ vendor/bin/hoa test:run

For more information, please read the contributor guide.

Quick usage

As a quick overview, we propose to start a websocket server and echo messages. The class Hoa\Websocket\Server proposes six listeners: open, message, binary-message, ping, close and error. Thus:

$websocket = new Hoa\Websocket\Server(
    new Hoa\Socket\Server('ws://127.0.0.1:8889')
);
$websocket->on('open', function (Hoa\Event\Bucket $bucket) {
    echo 'new connection', "\n";

    return;
});
$websocket->on('message', function (Hoa\Event\Bucket $bucket) {
    $data = $bucket->getData();
    echo '> message ', $data['message'], "\n";
    $bucket->getSource()->send($data['message']);
    echo '< echo', "\n";

    return;
});
$websocket->on('close', function (Hoa\Event\Bucket $bucket) {
    echo 'connection closed', "\n";

    return;
});
$websocket->run();

Finally, we have to write a client in HTML and Javascript:

<input type="text" id="input" placeholder="Message…" />
<hr />
<pre id="output"></pre>

<script>
  var host   = 'ws://127.0.0.1:8889';
  var socket = null;
  var input  = document.getElementById('input');
  var output = document.getElementById('output');
  var print  = function (message) {
      var samp       = document.createElement('samp');
      samp.innerHTML = message + '\n';
      output.appendChild(samp);

      return;
  };

  input.addEventListener('keyup', function (evt) {
      if (13 === evt.keyCode) {
          var msg = input.value;

          if (!msg) {
              return;
          }

          try {
              socket.send(msg);
              input.value = '';
              input.focus();
          } catch (e) {
              console.log(e);
          }

          return;
      }
  });

  try {
      socket = new WebSocket(host);
      socket.onopen = function () {
          print('connection is opened');
          input.focus();

          return;
      };
      socket.onmessage = function (msg) {
          print(msg.data);

          return;
      };
      socket.onclose = function () {
          print('connection is closed');

          return;
      };
  } catch (e) {
      console.log(e);
  }
</script>

Here we are. All sent messages are echoed.

Awecode

The following awecodes show this library in action:

  • Hoa\Websocket: why and how to use Hoa\Websocket\Server and Hoa\Websocket\Client? A simple example will illustrate the WebSocket protocol.

Documentation

The hack book of Hoa\Websocket contains detailed information about how to use this library and how it works.

To generate the documentation locally, execute the following commands:

$ composer require --dev hoa/devtools
$ vendor/bin/hoa devtools:documentation --open

More documentation can be found on the project's website: hoa-project.net.

Getting help

There are mainly two ways to get help:

Contribution

Do you want to contribute? Thanks! A detailed contributor guide explains everything you need to know.

License

Hoa is under the New BSD License (BSD-3-Clause). Please, see LICENSE for details.

Related projects

The following projects are using this library:

  • Marvirc, A dead simple, extremely modular and blazing fast IRC bot,
  • WellCommerce, Modern e-commerce engine built on top of Symfony 3 full-stack framework.
Comments
  • Many messages are lost if there are concurrent clients sending them

    Many messages are lost if there are concurrent clients sending them

    Hello,

    I've been playing with many concurrent clients calling a server so that it rebroadcasts the sent message to other clients. However, the sad news is that it appears I'm losing almost 20%-30% of those messages when I have 5 or more concurrent connections.

    A simple test case is as follow:

    server.php

    $i = 0;
    $j = 0;
    $k = 0;
    
    $websocket = new Hoa\Websocket\Server(
        new Hoa\Socket\Server('tcp://127.0.0.1:8889')
    );
    $websocket->on('open', function (Hoa\Core\Event\Bucket $bucket) use (&$i) {
        echo 'connection ' . ++$i . PHP_EOL;
    });
    $websocket->on('message', function (Hoa\Core\Event\Bucket $bucket) use (&$j) {
        echo 'message ' .++$j.PHP_EOL;
    });
    $websocket->on('close', function (Hoa\Core\Event\Bucket $bucket) use (&$k) {
        echo 'connection closed ' . ++$k . PHP_EOL;
    });
    $websocket->run();
    

    client.php

    $client   = new Hoa\Websocket\Client(
        new Hoa\Socket\Client('tcp://127.0.0.1:8889')
    );
    $client->setHost('test');
    $client->connect();
    
    $client->send('HELLO WORLD');
    

    test command

    ab -n 500 -c 5 -B 127.0.0.1 http://localhost/client.php
    

    Here's what I see at the end of a run:

    connection 500
    message 372
    connection closed 369
    

    What I'd expect:

    connection 500
    message 500
    connection closed 500
    

    I haven't investigated yet as to what the issue is, but considering that all connection are properly made, something occurs between the time the connection is made and the time a message is supposed to be sent. It is also interesting to note that many connections aren't closed as well, which doesn't sound good.

    Tested different concurrency levels:

    | Concurrency | messages retransmitted/connections | messages delivered overall | | --- | --- | --- | | 1 | 500/500 | 100% | | 2 | 464/500 | 93% | | 3 | 433/500 | 87% | | 4 | 398/500 | 80% | | 5 | 362/500 | 72% | | 500 | 250/500 | 50% |

    Edit 1: After some more testing and playing around, it seems very critical for the client code to call $client->close();. Doing so increases the rate of message delivered to almost 100% (but not 100%).

    Suggested: Implement the __destruct method in Clients classes so that they may close their connection cleanly (if the user didn't call close() himself).

    Furthermore, it appears that the connections that do not end up triggering a close event are actually triggering an error event. It has to do with the fact that we try to write to a socket that has been closed.

    bug difficulty: hard 
    opened by tomzx 58
  • "Get rsv1: 0, rsv2: 1, rsv3: 0, they all must be equal to 0" with large arrays sent

    I'm trying to send big arrays filled with floats to Hoa\WebSocket\Server. I wrote a client for testing purposes : https://squadclient-html5-etiennewan-1.c9.io/test.html

    There is no problem with little arrays (with a length of 1, 10 or an hundred items) When sending bigger arrays, the WebSocket connection closes unexpectedly without errors server-side and with this reason sent to the client : "Get rsv1: 0, rsv2: 1, rsv3: 0, they all must be equal to 0" with one or more rsv equal to 1.

    Here is the PHP server code (as simple as codes in examples):

    <?php
    require_once 'vendor/autoload.php';
    
    $server = new Hoa\Websocket\Server(
        new Hoa\Socket\Server('tcp://'.$argv[1].':'.$argv[2])
    );
    
    $server->on('message', function (Hoa\Core\Event\Bucket $bucket) {
        $data = $bucket->getData();
    
        $received = count(explode(",", $data['message']))-1;
    
        echo $received, PHP_EOL;
    
        $source = $bucket->getSource();
    
        $source->send($received);
    
        return;
    });
    
    $server ->on('open', function (){
        echo 'new client connection', PHP_EOL;
    
    });
    
    echo "Server is starting", PHP_EOL;
    $server->run();
    

    Note : the client and server are hosted on Cloud9 and will be running for debugging purposes. A live-debugging sessions is possible on the server workspace. Please tell me if you want to have access to it.

    Addendum: The size of the array needed to reproduce the error can vary, but 800 seems to be the minimum sometimes. Here, I only work with normal arrays, but it seemed to happened more often with typed arrays (I was trying to send Float32Array (1024 items) when the error occured for the first time)

    bug question 
    opened by etiennewan 45
  • It seems to not work via Android tethering

    It seems to not work via Android tethering

    I have an application with a Hoa WebSocket Server. When I connect my laptop to internet through my Android phone (tethering), i can open a connection... but no more.

    When I go to http://www.websocket.org/echo.html (with same network configuration), all is working.

    Do you think it could be a little problem in Hoa\WebSocket ?

    bug 
    opened by marmotz 32
  • Feature/socket wrapper

    Feature/socket wrapper

    Hello !

    Here the PR about the implementation of hoaproject/Socket#27 in the websocket project.

    I tried to make it clean :

    • Must use WebsocketSocket instead of just Socket to avoid Socket name reusing (due to Hoa\Socket\Socket flexion) ;
    • Retrieve endPoint from the socket if it is not given to Websocket\Client constructor ;
    • Add the factories to Websocket\Connection.

    But I have a problem about factories loading... They are defined in the Websocket lib so if I construct a Socket\Client before using Websocket\Client the factories are not yet loaded...

    Examples :

    <?php
    $connection = new Socket\Client('wss://0.0.0.0/a/path');
    // Here the transport wrappers are not yet registered because classes are loaded
    // only at first use
    $client = new Websocket\Client($connection);
    // They are defined here but too late, I already get a "wss transport does not exists" exception
    
    <?php
    // That way it works because PHP parser encounter the `Websocket\Client` token
    // before the `Socket\Client`
    $client = new Websocket\Client(
        new Socket\Client('wss://0.0.0.0/a/path')
    );
    

    For me there is 3 approachs to use here :

    • Create an extension of Socket\Client and use it instead of the root class to enable and use the wrappers properly ;
    • Change the register approach (I haven't idea here) ;
    • Create a factory for the Websocket\Client which handle Socket\Client creation.

    I think it's not really valid because sometimes the code will works, sometimes not because of instruction order...

    I haven't added tests for the moment because we need to validate the approach before...

    enhancement difficulty: medium 
    opened by shulard 25
  • How to broadcast events to websocket server with URL wss://xxx.xx

    How to broadcast events to websocket server with URL wss://xxx.xx

    Hello,

    I'm currently trying to implement slack bot stuff using PHP. I found that there is an awesome Real Time Messaging API which using websockets (https://api.slack.com/rtm).

    I tried to implement a method which can follow the given steps :

    • call : https://api.slack.com/methods/rtm.start
    • extract the websocket URL (key url in the JSON)
    • connect to the websocket
    • broadcast message

    I found that Hoaproject as an awesome WebSocket client/server but I can't find a way to do that...

    A websocket URL given by Slack API (they have a lifetime of 30sec): wss://ms177.slack-msgs.com/websocket/GEjhTU7tHl3C90SwJuKaF71Orb8F9HZgdv-HIwf4HxIMygveAW9xc2X_bZb_LtDXLVAapy7nTJ7qh9Oz0zYnyrr7Gn2kD4635oihxNh3ZTM=.

    Here the code I used to do that :

    <?php
    require_once __DIR__.'/vendor/autoload.php';
    
    $rtmStart = "https://slack.com/api/rtm.start?token=".$argv[1];
    $content = json_decode(file_get_contents($rtmStart));
    
    $client = new Hoa\Websocket\Client( new Hoa\Socket\Client($url) );
    $client->connect();
    
    $client->send('{
         "type": "message",
         "channel": "XXX",
         "user": "XXX",
         "text": "Hello world",
         "ts": "'.microtime(true).'"
    }');
    
    $client->close();
    

    Thanks :)

    question difficulty: medium 
    opened by shulard 25
  • Update `Websocket\Server` and `Websocket\Client` constructor behaviour

    Update `Websocket\Server` and `Websocket\Client` constructor behaviour

    Previously the constructors must be called with an instance of Socket\Client or Socket\Server as the first parameter.

    This PR allow the constructors to build the valid instance from a string.

    Added: type check + doc update

    enhancement difficulty: medium 
    opened by shulard 20
  • Call to a member function send() on null

    Call to a member function send() on null

    hoaproject/Websocket 2.15.08.05

    I have setup a small websocket server which only dispatches message to all other connected clients. I use client code available @ http://hoa-project.net/En/Awecode/Websocket.html to connect to the server with ab: ab -c 50 -n 500 http://localhost/client-push.php.

    However, it appears that as soon as I do that, the websocket server crashes with the following error:

    PHP Fatal error: Call to a member function send() on null in /site/vendor/hoa/websocket/Connection.php on line 508 PHP Stack trace: PHP 1. {main}() /site/API/X/Server.php:0 PHP 2. NAMESPACE\Server::run() /site/API/X/Server.php:11 PHP 3. Hoa\Socket\Connection\Handler->run() /site/src/Z/Y/X/Server.php:16 PHP 4. Hoa\Websocket\Connection->_run() /site/vendor/hoa/socket/Connection/Handler.php:186 PHP 5. Hoa\Core\Event\Listener->fire() /site/vendor/hoa/websocket/Connection.php:310 PHP 6. Hoa\Core\Consistency\Xcallable->__invoke() /site/vendor/hoa/core/Event.php:524 PHP 7. call_user_func_array:{/site/vendor/hoa/core/Consistency.php:762}() /site/vendor/hoa/core/Consistency.php:762 PHP 8. NAMESPACE\Server::NAMESPACE{closure}() /site/vendor/hoa/core/Consistency.php:762 PHP 9. Hoa\Socket\Connection\Handler->broadcast() /site/src/Z/Y/X/Server.php:14 PHP 10. call_user_func_array:{/site/vendor/hoa/socket/Connection/Handler.php:288}() /site/vendor/hoa/socket/Connection/Handler.php:288 PHP 11. Hoa\Socket\Connection\Handler->broadcastIf() /site/vendor/hoa/socket/Connection/Handler.php:288 PHP 12. call_user_func_array:{/site/vendor/hoa/socket/Connection/Handler.php:323}() /site/vendor/hoa/socket/Connection/Handler.php:323 PHP 13. Hoa\Websocket\Connection->send() /site/vendor/hoa/socket/Connection/Handler.php:323 PHP 14. Hoa\Socket\Connection\Handler->Hoa\Socket\Connection{closure}() /site/vendor/hoa/websocket/Connection.php:534 PHP 15. call_user_func_array:{/site/vendor/hoa/socket/Connection/Handler.php:257}() /site/vendor/hoa/socket/Connection/Handler.php:257 PHP 16. Hoa\Websocket\Connection->Hoa\Websocket{closure}() /site/vendor/hoa/socket/Connection/Handler.php:257

    Note that if I run ab without concurrency, the server does not crash.

    Thanks by the way for this awesome library :)

    bug difficulty: medium 
    opened by tomzx 19
  • Need a socket factory

    Need a socket factory

    Will fix #41.

    1. People are likely to use ws:// or wss:// directly. They don't understand that we must use a tcp:// URL. I can't blame them. HTTP Upgrade is just… confusing.
    2. Moreover, there is a need for automatic encryption, because with wss://, we need to instanciate a Hoa\Socket\Client object with tcp://…:443 and then call enableEncryption. Most of the time with ENCRYPTION_TLS (maybe with SSLv2 or SSLv3 sometimes, how to know?).
    3. In addition, we have to deal with URL endpoint (in the Websocket client).

    So, yup, this is more like a factory. The same way we have Hoa\Socket\Socket to parse tcp:// and udp:// URL, maybe we can extend it to support ws:// and wss://. It could be great to have an enhanced Hoa\Socket\Socket object where we could be able to register new schemes (like ws:// or wss://) in order to automatically transform a string into a real Hoa\Socket\Socket valid object (with a real tcp:// or udp:// URL). So it requires a little bit of work on Hoa\Socket.

    Here is the work I propose:

    1. On Hoa\Socket\Socket:
      1. Introduce a “socket wrapper” interface that declares a factory to transform a URL into a valid Hoa\Socket\Socket object (or a child of),
      2. Introduce the registerWrapper and unregisterWrapper static methods that take a “socket wrapper” interface as an argument,
      3. Declare tcp:// and udp:// as socket wrappers.
    2. On Hoa\Socket\Connection:
      1. In the setSocket method, we receive a URL; we then have to find and apply the appropriated stream wrapper to get a valid Hoa\Socket\Socket object (or a child of).
    3. On Hoa\Websocket\Connection:
      1. We must create Hoa\Websocket\Socket (the “socket wrapper”) that extends Hoa\Socket\Socket,
      2. We must declare the “socket wrapper” ws:// and wss://.

    When executing:

    new Hoa\Websocket\Client(
        new Hoa\Socket\Client('ws://…')
    )
    

    What is going to happen? The ws:// and wss:// URLs are going to be transform into a Hoa\Websocket\Socket object because Hoa\Socket\Client is extending Hoa\Socket\Connection\Connection. This latter will call the setSocket method: It will look for a valid “socket wrapper”, execute it and a valid Hoa\Websocket\Socket will be created. It will be used by Hoa\Websocket\Client very smootly thanks to inheritance, but we will have more information on it, such as: Should it be encrypted? for instance (in the Hoa\Websocket\Client, we would just need to call $connection->getSocket()->isSecure() for instance). Finally, we will have to act accordingly.

    Well, that's easier that what I thought!

    Finally: We will have to update the documentation.

    enhancement difficulty: medium 
    opened by Hywan 13
  • Problem when using broadcast() in the 'close' event

    Problem when using broadcast() in the 'close' event

    Hi,

    When i try to Use the broadcast() function on a close event in the server, if a client disconnect himself, the first remaining connected client gets disconnected and he's the only one to receive the broadcast message . Others don't receive anything.

    $websocket->on('close', function ( Hoa\Core\Event\Bucket $bucket )  {
        echo "connection closed\n";
        $bucket->getSource()->broadcast("A client disconnect himself from server"));
        return;
    });
    

    To understand, here's an example :

    • Client 1 connect himself to server
    • Client 2 connect himself to server
    • Client 3 connect himself to server
    • Client 1 disconnect himself from server
    • Client 2 receive message "A client disconnect from server" , and immediatly get disconnected from server
    • Client 3 doesn't get any message and is still connected
    bug 
    opened by Geslain 10
  • Fire close event before closing and on error

    Fire close event before closing and on error

    Firing the close event before closing allows for the user to grab the connection's unique ID. This is useful if the user is keeping track of connection based states across the lifecycle of a connection (e.g. session data).

    Fire the event on a protocol error as well before closing.

    enhancement difficulty: medium 
    opened by ghost 8
  • Injecting data at the WebSocket/Node object...

    Injecting data at the WebSocket/Node object...

    Injecting data at the WebSocket/Node object

    Hello, I try including this library at my project in Laravel. In this moment I can manage the running of server from Laravel using Artisan command, but I need vinculate one or some nodes for each client, when the client connect at the system.

    Other things what I need is configure the listeners on one abstract class, but inside the server connection, while it is running. For example, I need create one class calling HoaWebSocket, and I can configure for example, this:

    class HoaWebSocket extend [hoa way point class] {
        ...
        public function onOpen($node, $user) {
            //Assing one node at one user.
        }
    
        public function send($message, $user) {
            //Send one message at one node.
        }
        ...
    }
    

    This is a fictitious idea, is only for comment the flow with I need.

    In this moment, I can send the system message at our user using this method

    use Hoa\Websocket\Client as WsClient;
    use Hoa\Socket\Client as SClient;
    ...
        public function getLogin()
        {
            $client = new WsClient(
                new SClient('tcp://127.0.0.1:8080')
            );
            $client->connect();
            $client->send('Login rendered');
            $client->close();
    
            return view('auth.login');
        }
    ...
    

    And the idea final is it:

    use HoaWebSocket;
    ...
        public function getLogin()
        {
            HoaWebSocket::send('Login rendered', User::findById(1));
            return view('auth.login');
        }
    ...
    

    But, doing this action without Hoa\Websocket\Client and/or Hoa\Socket\Client.

    Thanks

    YnievesDotNet

    question difficulty: casual 
    opened by YnievesDotNet 8
  • Connection is closed

    Connection is closed

    Console: WebSocket connection to 'ws://127.0.0.1:8889/' failed, WebSocket is already in CLOSING or CLOSED state I'm using Google Chrome(90.0.4430.212) 64bits

    opened by alexolliveira 0
  • Upgrade to GitHub-native Dependabot

    Upgrade to GitHub-native Dependabot

    Dependabot Preview will be shut down on August 3rd, 2021. In order to keep getting Dependabot updates, please merge this PR and migrate to GitHub-native Dependabot before then.

    Dependabot has been fully integrated into GitHub, so you no longer have to install and manage a separate app. This pull request migrates your configuration from Dependabot.com to a config file, using the new syntax. When merged, we'll swap out dependabot-preview (me) for a new dependabot app, and you'll be all set!

    With this change, you'll now use the Dependabot page in GitHub, rather than the Dependabot dashboard, to monitor your version updates, and you'll configure Dependabot through the new config file rather than a UI.

    If you've got any questions or feedback for us, please let us know by creating an issue in the dependabot/dependabot-core repository.

    Learn more about migrating to GitHub-native Dependabot

    Please note that regular @dependabot commands do not work on this pull request.

    dependencies 
    opened by dependabot-preview[bot] 1
  • Dependabot can't resolve your PHP dependency files

    Dependabot can't resolve your PHP dependency files

    Dependabot can't resolve your PHP dependency files.

    As a result, Dependabot couldn't update your dependencies.

    The error Dependabot encountered was:

    Your requirements could not be resolved to an installable set of packages.
      Problem 1
        - Root composer.json requires hoa/socket dev-master -> satisfiable by hoa/socket[dev-master].
        - hoa/socket dev-master requires hoa/stream dev-master -> found hoa/stream[dev-master, 1.x-dev (alias of dev-master)] but it does not match your minimum-stability.
      Problem 2
        - Root composer.json requires hoa/http dev-master -> satisfiable by hoa/http[dev-master].
        - hoa/http dev-master requires hoa/stream dev-master -> found hoa/stream[dev-master, 1.x-dev (alias of dev-master)] but it does not match your minimum-stability.
      Problem 3
        - Root composer.json requires hoa/test dev-master -> satisfiable by hoa/test[dev-master].
        - hoa/test dev-master requires hoa/cli dev-master -> found hoa/cli[dev-master, 3.x-dev (alias of dev-master)] but it does not match your minimum-stability.
    

    If you think the above is an error on Dependabot's side please don't hesitate to get in touch - we'll do whatever we can to fix it.

    View the update logs.

    opened by dependabot-preview[bot] 0
  • Cannot find how to send message to customized Node

    Cannot find how to send message to customized Node

    Hello!

    I'm working on a project that manages Quizzs. For this project, I need to send message to specific users that are stored in different rooms. One room is made of two users. Each time one user sends a message to the WebSocket server, the server needs to send a message to both users in the room.

    The beginning of my code looks like that:

    $rooms = [];
    
    $server = new Hoa\Socket\Server('ws://127.0.0.1:8080');
    $websocket = new Hoa\Websocket\Server($server);
    
    $websocket->getConnection()->setNodeName(QuizzDuoNode::class);
    
    $websocket->on('open', function (Hoa\Event\Bucket $bucket) {
        echo 'new connection', "\n";
        
        return;
    });
    

    And If I simplify my code, it looks something like this:

    $websocket->on('message', function (Hoa\Event\Bucket $bucket) {
        global $rooms;
        global $server;
    
        $data = $bucket->getData();
        $msgInfo = json_decode($data['message'], true);
        $node = $bucket->getSource()->getConnection()->getCurrentNode();
        $node->setId($msgInfo['id']);
    
        $nodes = $server->getNodes();
    
        foreach ($rooms as $room) {
            foreach($nodes as $userNode) {
                if ($userNode->getId() === $room["user1"]) {
                    $userNode->send(... speficic message for user1...);
                } else if ($userNode->getId() === $room["user2"]) {
                    $userNode->send(... specific message for user2...);
                }
            }
        }
        
    
        return;
    });
    

    But If I try to use the send() method with a customized node, I get an error message saying that this method doesn't exist in QuizzDuoNode, which is true. The send method is not inherited from the Hoa\Websocket\Node, and I cannot find anything related to this in the documentation.


    My problem

    I cannot find anything in the documentation that would allow me to send a message to a specific user and I don't know how to do that.

    opened by MargotDumoulin 0
  • Operation timed out (nothing to accept)

    Operation timed out (nothing to accept)

    PHP Fatal error: Uncaught Hoa\Socket\Server::select(): (3) Operation timed out (nothing to accept). in /usr/local/nginx/html/websocket/vendor/hoa/socket/Server.php at line 337. thrown in /usr/local/nginx/html/websocket/vendor/hoa/socket/Server.php on line 337

    opened by mr-1024 0
  • Always crash server when client disconnect.

    Always crash server when client disconnect.

    Error: fwrite(): SSL operation failed with code 1. OpenSSL Error messages: error:140D00CF:SSL routines:SSL_write:protocol is shutdown

    Always. a simple refresh and the server crash.

    opened by gfdac 0
Releases(3.17.01.09)
  • 3.17.01.09(Jan 10, 2017)

    • Quality: Happy new year! (Ivan Enderlin, 2017-01-09T14:50:50+01:00)
    • Test: Fix namespace. (Ivan Enderlin, 2016-10-25T08:01:35+02:00)
    • Quality: Fix CHANGELOG.md. (Ivan Enderlin, 2016-10-24T15:58:06+02:00)
    Source code(tar.gz)
    Source code(zip)
  • 3.16.10.24(Oct 24, 2016)

    • Documentation: Update Composer instructions. (Ivan Enderlin, 2016-10-14T23:51:25+02:00)
    • Documentation: New README.md file. (Ivan Enderlin, 2016-10-14T23:47:22+02:00)
    • Connection: Start TLS encryption on handshake. (Ivan Enderlin, 2016-10-11T09:20:45+02:00)
    • Documentation: Update support properties. (Ivan Enderlin, 2016-10-11T08:51:04+02:00)
    Source code(tar.gz)
    Source code(zip)
  • 3.16.07.05(Jul 5, 2016)

    • Test: Write integration test suite. (Ivan Enderlin, 2016-06-20T09:43:20+02:00)
    • Protocol: Relax UTF-8 checking when sending. (Ivan Enderlin, 2016-07-05T08:26:23+02:00)
    • Test: Fix a test case. (Ivan Enderlin, 2016-06-24T09:30:27+02:00)
    • Protocol: Read the whole frame when length is zero. (Ivan Enderlin, 2016-06-24T08:11:34+02:00)
    • Quality: Fix API documentation. (Ivan Enderlin, 2016-06-17T17:10:38+02:00)
    • Connection: Wrap listeners into a try/catch block. (Ivan Enderlin, 2016-06-17T09:22:15+02:00)
    • Connection: Better safety for binary-message. (Ivan Enderlin, 2016-06-15T13:41:28+02:00)
    • Connection: Capture all exceptions in message. (Ivan Enderlin, 2016-06-15T13:39:09+02:00)
    • Quality: Fix CS. (Ivan Enderlin, 2016-06-15T13:39:03+02:00)
    • Connection: Use ::class instead of a string. (Ivan Enderlin, 2016-06-15T13:38:47+02:00)
    • Test: Write test suite of …Websocket\Connection. (Ivan Enderlin, 2016-06-15T13:38:09+02:00)
    • Client: Extract the getNewChallenge method. (Ivan Enderlin, 2016-05-31T23:21:03+02:00)
    • Test: Write test suite of Hoa\Websocket\Client. (Ivan Enderlin, 2016-05-30T17:08:33+02:00)
    • Test: Ensure disconnection if handshake fails. (Ivan Enderlin, 2016-05-30T16:53:08+02:00)
    • Quality: Rename an internal variable. (Ivan Enderlin, 2016-05-30T08:58:52+02:00)
    • Test: Write test suite of Hoa\Websocket\Server. (Ivan Enderlin, 2016-05-30T08:27:07+02:00)
    • Protocol: Use the getConnection method. (Ivan Enderlin, 2016-05-27T21:21:33+02:00)
    • Protocol: Update an exception message. (Ivan Enderlin, 2016-05-27T17:02:52+02:00)
    • Test: Write test suite of …cket\Protocol\Hybi00. (Ivan Enderlin, 2016-05-27T17:02:09+02:00)
    • Test: Update a test case. (Ivan Enderlin, 2016-05-27T16:49:57+02:00)
    • Test: Write test suite of …ket\Protocol\Generic. (Ivan Enderlin, 2016-05-27T09:58:43+02:00)
    • Protocol: Extract the getMaskingKey method. (Ivan Enderlin, 2016-05-24T08:54:15+02:00)
    • Documentation: Update API documentation. (Ivan Enderlin, 2016-05-23T08:56:28+02:00)
    • Documentation: Update API documentation. (Ivan Enderlin, 2016-05-23T08:56:16+02:00)
    • Test: Write test suite of Hoa\Websocket\Node. (Ivan Enderlin, 2016-05-20T17:02:48+02:00)
    • Test: Write test suite of …ption\InvalidMessage. (Ivan Enderlin, 2016-05-20T09:31:07+02:00)
    • Test: Write test suite of …\Websocket\Exception. (Ivan Enderlin, 2016-05-20T09:30:49+02:00)
    • Test: Write test suite of …Exception\CloseError. (Ivan Enderlin, 2016-05-20T09:07:59+02:00)
    • Test: Write test suite of …xception\BadProtocol. (Ivan Enderlin, 2016-05-20T09:07:32+02:00)
    • Test: Write test suite of …ket\Protocol\Rfc6455. (Ivan Enderlin, 2016-05-20T08:46:32+02:00)
    • Test: Write test suite of …Websocket\Connection. (Ivan Enderlin, 2016-05-20T08:45:39+02:00)
    • Protocol: Rfc6455 uses getConnection. (Ivan Enderlin, 2016-05-20T08:19:45+02:00)
    • Protocol: Add the getConnection method. (Ivan Enderlin, 2016-05-20T08:17:32+02:00)
    Source code(tar.gz)
    Source code(zip)
  • 3.16.05.09(May 9, 2016)

    • Test: Add a test case to Socket for query strs. (Ivan Enderlin, 2016-05-09T13:41:13+02:00)
    • Socket: Compile query strings. (Ivan Enderlin, 2016-05-09T13:40:10+02:00)
    Source code(tar.gz)
    Source code(zip)
  • 3.16.03.15(Mar 15, 2016)

    • Connection: Catch disconnection of a node earlier. (Ivan Enderlin, 2016-02-24T07:51:18+01:00)
    • Connection: Ensure handshake before sending. (Ivan Enderlin, 2016-02-19T07:59:37+01:00)
    • Documentation: Introduce ws:// and wss://. (Ivan Enderlin, 2016-02-15T08:11:28+01:00)
    • Test: Write test suite of Hoa\Websocket\Socket. (Ivan Enderlin, 2016-02-10T08:22:57+01:00)
    • Socket: Detect invalid URI in transport factory. (Ivan Enderlin, 2016-02-10T08:20:45+01:00)
    • Composer: Require hoa/test. (Ivan Enderlin, 2016-02-09T17:06:15+01:00)
    • Quality: Fix CS. (Stéphane HULARD, 2015-12-07T14:10:41+01:00)
    • Socket: Introduce ws:// and wss:// transports. (Stéphane HULARD, 2015-07-30T12:05:54+02:00)
    • Socket: Introduce the Socket class. (Stéphane HULARD, 2015-07-30T11:37:27+02:00)
    • CHANGELOG: Fix format. (Ivan Enderlin, 2016-01-14T22:23:09+01:00)
    Source code(tar.gz)
    Source code(zip)
  • 3.16.01.14(Jan 14, 2016)

  • 3.16.01.11(Jan 11, 2016)

    • Quality: Drop PHP5.4. (Ivan Enderlin, 2016-01-11T09:15:27+01:00)
    • Quality: Run devtools:cs. (Ivan Enderlin, 2016-01-09T09:11:24+01:00)
    • Core: Remove Hoa\Core. (Ivan Enderlin, 2016-01-09T08:28:37+01:00)
    • Consistency: Update uuid call. (Ivan Enderlin, 2015-12-08T23:48:52+01:00)
    • Consistency: Use Hoa\Consistency. (Ivan Enderlin, 2015-12-08T22:16:18+01:00)
    • Event: Use Hoa\Event. (Ivan Enderlin, 2015-11-23T22:26:40+01:00)
    • Exception: Use Hoa\Exception. (Ivan Enderlin, 2015-11-20T20:23:26+01:00)
    Source code(tar.gz)
    Source code(zip)
  • 2.15.08.05(Aug 5, 2015)

    • Fix notice on PHP5.5+. (Metalaka, 2015-08-04T22:59:15+02:00)
    • Add .gitignore file. (Stéphane HULARD, 2015-08-03T11:06:58+02:00)
    • Add RFC references. (Ivan Enderlin, 2015-07-22T09:42:39+02:00)
    Source code(tar.gz)
    Source code(zip)
  • 2.15.05.29(May 29, 2015)

    • Move to PSR-1 and PSR-2. (Ivan Enderlin, 2015-05-21T10:05:40+02:00)
    • Fix a typo. (Ivan Enderlin, 2015-04-06T12:34:42+02:00)
    • Fix typos. (Ivan Enderlin, 2015-04-06T08:39:39+02:00)
    • Fix some typos. (Ivan Enderlin, 2015-02-26T08:38:24+01:00)
    Source code(tar.gz)
    Source code(zip)
  • 2.15.02.16(Feb 16, 2015)

    • Add the CHANGELOG.md file. (Ivan Enderlin, 2015-02-16T14:25:21+01:00)
    • Fix documentation links (Ivan Enderlin, 2015-01-23T19:27:59+01:00)
    • Happy new year! (Ivan Enderlin, 2015-01-05T14:57:10+01:00)
    Source code(tar.gz)
    Source code(zip)
  • 2.14.12.10(Feb 16, 2015)

  • 2.14.11.09(Feb 16, 2015)

  • 2.14.09.23(Feb 16, 2015)

  • 2.14.09.17(Feb 16, 2015)

Owner
Hoa
Hoa is a modular, extensible and structured set of PHP libraries.
Hoa
A pragmatic event sourcing library for PHP with a focus on developer experience.

EventSaucePHP EventSauce is a somewhat opinionated, no-nonsense, and easy way to introduce event sourcing into PHP projects. It's designed so storage

EventSauce 685 Dec 31, 2022
The Hoa\Websocket library.

Hoa is a modular, extensible and structured set of PHP libraries. Moreover, Hoa aims at being a bridge between industrial and research worlds. Hoa\Web

Hoa 419 Dec 30, 2022
The Hoa\Eventsource library.

Hoa is a modular, extensible and structured set of PHP libraries. Moreover, Hoa aims at being a bridge between industrial and research worlds. Hoa\Eve

Hoa 106 Dec 5, 2022
[READ-ONLY] The event dispatcher library for CakePHP. This repo is a split of the main code that can be found in https://github.com/cakephp/cakephp

CakePHP Event Library This library emulates several aspects of how events are triggered and managed in popular JavaScript libraries such as jQuery: An

CakePHP 21 Oct 6, 2022
🚀 Coroutine-based concurrency library for PHP

English | 中文 Swoole is an event-driven asynchronous & coroutine-based concurrency networking communication engine with high performance written in C++

Swoole Project 17.7k Jan 5, 2023
Image optimization / compression library. This library is able to optimize png, jpg and gif files in very easy and handy way. It uses optipng, pngquant, pngcrush, pngout, gifsicle, jpegoptim and jpegtran tools.

Image Optimizer This library is handy and very easy to use optimizer for image files. It uses optipng, pngquant, jpegoptim, svgo and few more librarie

Piotr Śliwa 879 Dec 30, 2022
PHP Exif Library - library for reading and writing Exif headers in JPEG and TIFF files using PHP.

PEL: PHP Exif Library README file for PEL: PHP Exif Library. A library with support for reading and writing Exif headers in JPEG and TIFF images using

null 264 Dec 4, 2022
BeckhoffPLCSoapClient - SoapClient to communicate with BeckHoff PLC. Library made in PHP based on TcAdsWebService JavaScript Library.

BeckhoffPLCSoapClient - SoapClient to communicate with BeckHoff PLC. Library made in PHP based on TcAdsWebService JavaScript Library.

null 3 May 18, 2022
EmailReplyParser is a PHP library for parsing plain text email content, based on GitHub's email_reply_parser library written in Ruby

EmailReplyParser EmailReplyParser is a PHP library for parsing plain text email content, based on GitHub's email_reply_parser library written in Ruby.

William Durand 606 Dec 8, 2022
Library JGU is a website created for a university library system information. Made with PHP & TailwindCSS.

Library JGU Library JGU is a website created for a university library system information. Made with PHP & TailwindCSS. Key Features • How To Use • Rel

Azkazikna Ageung Laksana 23 Oct 7, 2022
This library extends the 'League OAuth2 Client' library to provide OpenID Connect Discovery support for supporting providers that expose a .well-known configuration endpoint.

OpenID Connect Discovery support for League - OAuth 2.0 Client This library extends the League OAuth2 Client library to provide OpenID Connect Discove

null 3 Jan 8, 2022
Laravel-Library-Management-system is nice to management library system...

About Laravel Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experie

Eng Hasan Hajjar 2 Sep 30, 2022
Dobren Dragojević 6 Jun 11, 2023
Simple utility and class library for generating php classes from a wsdl file.

wsdl2phpgenerator Simple WSDL to PHP classes converter. Takes a WSDL file and outputs class files ready to use. Uses the MIT license. Announcement: We

null 802 Dec 10, 2022
A PHP library to support implementing representations for HATEOAS REST web services.

Hateoas A PHP library to support implementing representations for HATEOAS REST web services. Installation Working With Symfony Usage Introduction Conf

William Durand 998 Dec 5, 2022
This PHP library will help you to work with your Pinterest account without using any API account credentials.

Pinterest Bot for PHP A PHP library to help you work with your Pinterest account without API credentials. The Pinterest API is painful: receiving an a

Sergey Zhuk 414 Nov 21, 2022
A simple Monad library for PHP

MonadPHP This is a basic Monad library for PHP. Usage Values are "wrapped" in the monad via either the constructor: new MonadPHP\Identity($value) or t

Anthony Ferrara 283 Dec 29, 2022
A simple library to work with JSON Web Token and JSON Web Signature

JWT A simple library to work with JSON Web Token and JSON Web Signature based on the RFC 7519. Installation Package is available on Packagist, you can

Luís Cobucci 6.8k Jan 3, 2023
Open source social sign on PHP Library. HybridAuth goal is to act as an abstract api between your application and various social apis and identities providers such as Facebook, Twitter and Google.

Hybridauth 3.7.1 Hybridauth enables developers to easily build social applications and tools to engage websites visitors and customers on a social lev

hybridauth 3.3k Dec 23, 2022
PHP 5.3+ oAuth 1/2 Client Library

PHPoAuthLib NOTE: I'm looking for someone who could help to maintain this package alongside me, just because I don't have a ton of time to devote to i

David Desberg 1.1k Dec 27, 2022