Permalink
Browse files

Merge pull request #5 from GunioRobot/clean

Hi! I cleaned up your code for you!
  • Loading branch information...
2 parents b897da9 + 63819c0 commit af67a7af9cbf27178e1cbda9fefae9f4807db9d6 Superfeedr.com committed Oct 28, 2011
Showing with 211 additions and 191 deletions.
  1. +20 −0 .gitignore
  2. +6 −6 README.markdown
  3. +1 −1 demo/demo.js
  4. +1 −1 demo/index.html
  5. +87 −87 demo/strophe.js
  6. +4 −4 demo/strophedemo.js
  7. +37 −37 src/ejabberd_websocket.erl
  8. +1 −1 src/ejabberd_websocket.hrl
  9. +21 −21 src/ejabberd_xmpp_websocket.erl
  10. +33 −33 src/mod_websocket.erl
View
@@ -0,0 +1,20 @@
+# Compiled source #
+###################
+*.com
+*.class
+*.dll
+*.exe
+*.o
+*.so
+*.pyc
+
+# Logs and databases #
+######################
+*.log
+
+# OS generated files #
+######################
+.DS_Store*
+ehthumbs.db
+Icon?
+Thumbs.db
View
@@ -22,28 +22,28 @@ In the listeners section add the following line:
Make sure you also add this line in the <code>Modules</code>
<code>{mod_websocket, []}</code>
-
-
+
+
## Usage
Just connect to the websocket using your browser's API, and send your XMPP traffic over it.
You may find it convenient to use directly [Strophejs](https://github.com/metajack/strophejs) as it's a full XMPP library in Javascript. However, you will have to use [this branch](https://github.com/superfeedr/strophejs) for now, as it adds support for websocket, as the underlying protocol (instead of Bosh).
-To setup a connection :
+To setup a connection :
<code>
// WS_SERVICE should be http://host.tld:5288/ws-xmpp, based on the configuration you chose.
- connection = new Strophe.Connection({protocol: new Strophe.Websocket(WS_SERVICE) });
+ connection = new Strophe.Connection({protocol: new Strophe.Websocket(WS_SERVICE) });
</code>
## TODO
-The most 'urgent' thing to do is to provide fallback mechanisms in this module. For example, support for [socket.io](http://socket.io/) would be amazing, as erlang has its own [implementation](https://github.com/yrashk/socket.io-erlang). Feel free to fork and make it better!
+The most 'urgent' thing to do is to provide fallback mechanisms in this module. For example, support for [socket.io](http://socket.io/) would be amazing, as erlang has its own [implementation](https://github.com/yrashk/socket.io-erlang). Feel free to fork and make it better!
## Thank you
-Sponsored by [Superfeedr](http://superfeedr.com). Special thanks to [Nathan](http://unclenaynay.com/) for his awesome work, [Jack](http://metajack.im/) for his help.
+Sponsored by [Superfeedr](http://superfeedr.com). Special thanks to [Nathan](http://unclenaynay.com/) for his awesome work, [Jack](http://metajack.im/) for his help.
## License
View
@@ -43,5 +43,5 @@ $(function() {
$('#buttonSend').click(function(event) {
WsDemo.send($('#phrase').val());
$('#phrase').val('');
- });
+ });
});
View
@@ -9,7 +9,7 @@
<form id="connect">
<label for="server">Server:</label> <input id="server" />
<br />
-
+
<label for="un">Username:</label> <input id="un" /> @ <input id="un_server" />
<br />
Oops, something went wrong. Retry.

0 comments on commit af67a7a

Please sign in to comment.