GitXplorerGitXplorer
a

rxphp-chat

public
20 stars
6 forks
0 issues

Commits

List of commits on branch master.
Unverified
05725c0e6ea079a90368777725522aecee260eac

Rx.PHP package name is lowercased and on packagist now

aasm89 committed 11 years ago
Unverified
03821ece5e97b168c5bbc202622d55d1afb9ed83

Initial commit

aasm89 committed 11 years ago

README

The README file for this repository.

Chat demo with Rx.PHP

This repository contains a simple demo application showing some of the abilities of Rx.PHP.

To run the project:

  • Clone this repository
  • Use composer to install the dependencies: composer.phar install
  • Run the examples

The source files in the bin/ directory are commented in a tutorial like fashion.

chat-server.php

chat-server.php contains a chat application that broadcasts messages to all connected clients. To run:

$ php bin/chat-server.php

Connect to the server multiple times to see it in action.

$ telnet localhost 8080
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
\o/

chat-server-channels.php

chat-server-channels.php builds on the other version, but now extending the functionality of the server with simple channels and commands to join, part and send messages to channels.

Commands:

join #name
part #name
#name Hi all!

To run:

$ php bin/chat-server-channels.php