forked from nowelium/socket.io-titanium
-
Notifications
You must be signed in to change notification settings - Fork 0
socket.io for titanium mobile
License
Unknown, Unknown licenses found
Licenses found
Unknown
LICENSE
Unknown
LICENSE.txt
nicktackes/socket.io-titanium
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
socket.io-titanium
------------------
How to use
==========
* run server(chat server)
shell > node prj/example-nodejs-server/chat.js
* client(chat client)
* DIR
prj/
- README
- LICENSE
- tiapp.xml
- example-nodejs-server/
- server.js
- chat.js
- Resources/
- app.js
- socket.io-titanium.js
- socket.io/
- package.json
- socket.io.js
- lib/
- io.js
- socket.js
- util.js
- transport.js
- transports/
- xhr.js
- xhr-polling.js
[js code]
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!!');
socket.on('message', function (message){
Titanium.API.debug('got message: ' + message);
});
Notes
=====
* Mac OSX
run with iphonesim or android:
set localnetwork alias localhost(127.0.0.1)::
shell > sudo ifconfig lo0 alias 169.254.10.100 netmask 0xffffff
run iphonesimlator..
[js code]
var socket = new io.Socket('169.254.10.100', { port: 8080 });
socket.connect()..
.
About
socket.io for titanium mobile
Resources
License
Unknown, Unknown licenses found
Licenses found
Unknown
LICENSE
Unknown
LICENSE.txt
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published