Skip to content

Commit

Permalink
* update README: new API
Browse files Browse the repository at this point in the history
  • Loading branch information
nowelium committed May 25, 2011
1 parent e67f398 commit c534ccb
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ socket.io-titanium
How to use
==========

* run server
* run server(chat server)

shell > node prj/example-nodejs-server/server.js
shell > node prj/example-nodejs-server/chat.js

* client
* client(chat client)

* install socket.io
[git]
Expand All @@ -21,6 +21,7 @@ How to use
- tiapp.xml
- example-nodejs-server/
- server.js
- chat.js
- Resources/
- app.js
- socket.io-titanium.js
Expand All @@ -37,8 +38,11 @@ How to use
- xhr-polling.js

[js code]
require('socket.io-titanium');
var io = require('socket.io-titanium');

//var socket = new io.Socket('169.254.10.100', { port: 8080 });
// or
//var socket = io.createSocket('169.254.10.100', { port: 8080 });
var socket = new io.Socket('169.254.10.100', { port: 8080 });
socket.connect();
socket.send('hello world!!');
Expand All @@ -51,7 +55,7 @@ Notes

* Mac OSX

run with iphonesim:
run with iphonesim or android:
set localnetwork alias localhost(127.0.0.1)::

shell > sudo ifconfig lo0 alias 169.254.10.100 netmask 0xffffff
Expand Down

0 comments on commit c534ccb

Please sign in to comment.