Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Mojolicious WebSocket Examples

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 mojo @ e077135
Octocat-spinner-32 public
Octocat-spinner-32 script
Octocat-spinner-32 .gitmodules
Octocat-spinner-32 README
README
In this repo you will find various examples using WebSockets and Mojolicious

http://mojolicio.us/

To check out the code using git:

git clone git://github.com/xantus/mojo-websocket-examples.git
cd mojo-websocket-examples
git submodule update --init


Running the examples

For non websocket native browsers, you need a flash policy server running
(port 843, so it needs to run as root)

sudo ./script/flash-policy-server &

then you can run the examples

Note, when running these examples, you shouldn't use http://localhost:3000/
Instead use 127.0.0.1 or another ip local to your box.  Chrome will just refuse to
connect to localhost (or used to?)


Example 1 - Simple echo server

./script/websocket-example-1

Then open http://127.0.0.1:3000/


Example 2 - Simple IRC Client

The server proxies to irc.perl.org, and drops you in #test (you can /join #mojo if you'd like)

./script/websocket-irc-example-1

Then open http://127.0.0.1:3000/

You might want to open multiple tabs or something to talk to yourself
Something went wrong with that request. Please try again.