Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hi! I cleaned up your code for you! #5

Merged
merged 1 commit into from
Oct 28, 2011
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -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
12 changes: 6 additions & 6 deletions README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion demo/demo.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,5 @@ $(function() {
$('#buttonSend').click(function(event) {
WsDemo.send($('#phrase').val());
$('#phrase').val('');
});
});
});
2 changes: 1 addition & 1 deletion demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ <h1>Ejabberd strophe demo</h1>
<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 />

Expand Down
Loading