Skip to content

labria/erlang_websocket

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Erlang WebSocket wrapper for MochiWeb

This is a simple wrapper around the mochiweb_socket_server to allow WebSocket connections. With this wrapper, you can write WebSocket connection loops just like you’d write a normal mochiweb application.

This repo is forked from the Dave Bryson’s one, but I’m working on allowing two-way communication with the client, with one process listening for data from the client, and another one sending data back, so you can send him messages without waiting for him to act.

The chat server example is actually work in progress (and can be broken anytime), it will be released in a week or so, after a huge refactoring.

Requirements:

  1. Erlang 12.5 or greater
  2. Google Chrome Browser developer channel release 4.0.249.0

Getting Started:

  1. download the code
  2. CD into the erlang_websocket directory
  3. run make

Run the cate example:

  1. CD into the examples/basic directory
  2. run the ‘start.sh’ script with sudo (the flash policy server needs to bind top port 843).
  3. Point the Chrome Browser (or any other if you want to try the Flash fallback) to ‘http://localhost:8000’

About

WebSocket implementation in Erlang/Mochiweb, with a chat app.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Erlang 87.8%
  • JavaScript 12.2%