Download the PHP package hannesvdvreken/socketio without Composer

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

Socket.io messages from PHP

What does it do?

This package allows you to transfer socket message to a Node.js process via Redis. Socket.io has a [redis adapter]() to allow scaling a Node.js cluster to send socket messages to any client connected to any process. We can use this to send messages straight from PHP.

This package provides a Socketio\Socketio class with similar methods as the socket.io server in Node.js such as emit, in, to, of and adapter.

Usage

First we can create a Socketio\Socketio object.

It has some of the same methods as in Node.js:

Namespace

Setup a server object with a different namespace. The $io object keeps the same namespace. Or use a callback:

Rooms

Send to specific room(s):

Where in is an alias of to. You can send to several rooms at the same time by chaining to calls. The rooms are reset after every emit call. This is similar behaviour as in Node.js.

Adapters

By default, the Socketio\Socketio object configures a Memory adapter. This adapter fakes socket message delivery and can be useful for testing/stubbing.

To setup the Redis adapter you need to configure some dependencies first.

If you have ext-msgpack installed, the Socketio\Utils\Msgpack will use the native msgpack_pack and msgpack_unpack methods which are supposed to be the fastest around.

If not, you can pass it Msgpack\Encoder and Msgpack\Decoder objects to do the encoding/decoding. These come pre-installed with composer if you require this package.

The Node.js process

Right now, you're good to go!

Contributing

Stick to PSR-2 Coding Standards and be nice in communication.

License

MIT


All versions of socketio with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4.0
hannesvdvreken/msgpack Version dev-master
predis/predis Version ~1.0
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 hannesvdvreken/socketio contains the following files

Loading the files please wait ....