Download the PHP package romainrg/ratchet_client without Composer

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

ratchet_client (CodeIgniter)

CodeIgniter library who allow you to make powerfull applications with realtime interactions by using Websocket technology and Ratchetphp (Socketo.me) 🚀🚀

:books: Dependencies

:beginner: Installation

:arrow_right: Step 1 : Library installation by Composer

Just by running following command in the folder of your project :

Or by adding following lines to your composer.json file :

Don't forget to include your autoload to CI config file :

:arrow_right: Step 2 : Create library config file in your project (Optional)

You have to create in your CI config folder located in ./application/config/ratchet_client.php or the library will take his own config file based on host 0.0.0.0:8282

:arrow_right: Step 3 : Loading the library

You can add the following lines direclty in your Controller file or your MY_Controller global file

You'r almost done :heavy_check_mark:

Examples of use

:arrow_right: Create your first App

It's not very difficult, the library will do your job and much more !

Ok you just created your first app ! :heavy_check_mark: (easy with CTRL+C and CTRL+V)

:arrow_right: Run the Websocket server

If you wan't to check you'r work, you have to run the server. Open you'r command prompt then type the command bellow in you'r project folder :

If you see the message the message bellow, you are done (don't close your cmd) !

First_launch.png

:arrow_right: Test the App

Open three pages of your project on following url with different IDs : http://localhost/myproject/user/index/204 http://localhost/myproject/user/index/402 http://localhost/myproject/user/index/604

:heavy_exclamation_mark: In my example, recipient_id is defined by user_id, as you can see, it's the auth callback who defines recipient ids.

If you have something like that, everything is ok for you:

User_204

You can try is by typing and sending something in each page (see cmd for more logs).

Cmd_list.png

Broadcast messages with your php App :boom: !

If you want to broadcast message with php script or something else you can use library like textalk/websocket (who is included in my composer.json as required library)

Note : The first message is mandatory and always here to perform authentication

Authentication & callbacks :recycle:

The library allow you to define some callbacks, here's an example :

What about Docker :whale: ?

Easy to start with this command (php 7.1 used)

Bugs :bug: or feature :muscle:

Be free to open an issue or send pull request

To do :construction:

For more CodeIgniter libraries, give me a :beer::grin:

> Beer road

:lock: License

GNU General Public License v3.0


All versions of ratchet_client with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6.0
cboden/ratchet Version ^0.4.1
textalk/websocket Version ^1.2
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 romainrg/ratchet_client contains the following files

Loading the files please wait ....