alawar/nginx_push_stream_bundle

dev-master 2016-03-09 17:53 UTC

This package is not auto-updated.

Last update: 2024-04-13 11:25:41 UTC


README

Build Status HHVM Status Coverage Status Scrutinizer Quality Score Dependency Status Latest Stable Version Total Downloads Latest Unstable Version License

nginx_push_stream_bundle

A PHP bundle to assist your nginx_push_stream_module installation:

  1. Generate links on server side.
  2. Publish messages.
  3. Automatically generate ids for messages on server side.
  4. Filter tokens:
  5. Hash token names in order to make them unpredictable and thus more secure.
  6. Prefix tokens to separate your applications sharing the same nginx_push_stream_module locations.

Installation

composer require alawar/nginx_push_stream_bundle dev-master

Usage

In Symfony2 you should register the bundle. Then add the following config:

nginx_push_stream:
  pub_url: http://.../pub?id={token}
  sub_urls:
    polling:      http://.../sub-p/{tokens}
    long-polling: http://.../sub-lp/{tokens}
    streaming:    http://.../sub-s/{tokens}
    eventsource:  http://.../sub-ev/{tokens}