<commit_before>![Hoa](http://static.hoa-project.net/Image/Hoa_small.png)

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

# Hoa\Eventsource ![state](http://central.hoa-project.net/State/Eventsource)

This library allows to manipulate the
[EventSource](http://w3.org/TR/eventsource/) (aka Server-Sent Events) technology
by creating a server.

## Quick usage

We propose as a quick overview to send an unlimited number of events from the
server to the client. The client will display all received events. Thus, in
`Server.php`:

```php
$server = new Hoa\Eventsource\Server();<commit_msg>Add the installation section.<commit_after>![Hoa](http://static.hoa-project.net/Image/Hoa_small.png)

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

# Hoa\Eventsource ![state](http://central.hoa-project.net/State/Eventsource)

This library allows to manipulate the
[EventSource](http://w3.org/TR/eventsource/) (aka Server-Sent Events) technology
by creating a server.

## Installation

With [Composer](http://getcomposer.org/), to include this library into your
dependencies, you need to require
[`hoa/eventsource`](https://packagist.org/packages/hoa/eventsource):

```json
{
    "require": {
        "hoa/eventsource": "~2.0"
    }
}
```

Please, read the website to [get more informations about how to
install](http://hoa-project.net/Source.html).

## Quick usage

We propose as a quick overview to send an unlimited number of events from the
server to the client. The client will display all received events. Thus, in
`Server.php`:

```php
$server = new Hoa\Eventsource\Server();
{'fraction_non_alphanumeric': 0.12724215246636772, 'fraction_numerical': 0.002242152466367713, 'mean_word_length': 4.721153846153846, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7260458', 'n_tokens_mistral': 549, 'n_tokens_neox': 526, 'n_words': 185}