• Stars
    star
    136
  • Rank 267,670 (Top 6 %)
  • Language
    JavaScript
  • License
    Other
  • Created over 13 years ago
  • Updated over 12 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

socket.io for titanium mobile
socket.io-titanium
------------------

[email protected]([email protected])
TiMob SDK 1.8.1

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
        - ti-websocket-client/
          - ti-websocket-client.js
        - socket.io/
          - package.json
          - lib/
            - io.js
            - socket.js
            - util.js
            - transport.js
            - transports/
              - xhr.js
              - xhr-polling.js
              - ...

Example
=======

  channel chat titanium example: Resources/win_ti.js
  channel chat server example: example-nodejs-server/chat.js

    va io = require('socket.io-titanium');
    var socket = io.connect('169.254.10.100:8080');
    var chat = socket.of('/chat');
    chat.on('available_channel', function (channels){
      channels.forEach(function (channelName){
        var row = Ti.UI.createTableViewRow({ title: channelName });
        ...
      });
      ...
    });
    chat.on('broadcat:message', function(message){
      ....
    });

    input.addEventListener('return', function(){
      chat.emit('post', input.value);
    });
    
    win.addEventListener('open', function(){
      chat.emit('join:channel', channelId);
    });

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 = io.connect('169.254.10.100:8080');
      socket.send('hello world!!');
      socket.on('message', function (message){
        ...
      });

  * android client:
    add property tiapp.xml
    <property name="ti.android.threadstacksize" type="int">32768</property>

More Repositories

1

geohash-mysql-func

geohash function for mysql
44
star
2

io.js

io-language engine for javascript
JavaScript
13
star
3

node-bitmap

pure javascript Bitmap library
JavaScript
12
star
4

socket.io-store-memcached

Memcached Store for Socket.io
JavaScript
9
star
5

TiMob-Module-Android-Thumbnail

android thumbnail module
Java
5
star
6

php-thread-utils

php thread utility
PHP
4
star
7

jna-libmemcached

libmemcached for JNA(Java Native Access)
C
4
star
8

JIRAClient

SOAP JIRAClient for PHP
PHP
3
star
9

phpbuf-rpc-example

phpbuf-rpc example
Java
3
star
10

Log4Io

Io
3
star
11

msgpack-socket-rpc

yet another msgpack socket rpc
Java
3
star
12

io-utils

Io
3
star
13

jna-libmecab

libmecab for JNA(Java Native Access)
Java
3
star
14

Jo

http://svn.coderepos.org/share/lang/java/Jo
Java
2
star
15

Hierophant

yet another distributed key-value storage(memcached server)
Java
2
star
16

protobuf-socket-rpc

fork http://code.google.com/p/protobuf-socket-rpc/
Java
2
star
17

actor.js

javascript Actor: scala's actor style
1
star
18

phptree

php abstract syntax tree(phc) online
PHP
1
star
19

Temperance

Java
1
star
20

TiMob-Plugin-Android-AndroidManifest-Rewrite

TiMob(android) generated AndroidManifest.xml rewrite plugin (ins android:screenOrientation attribute)
Python
1
star
21

bluff-node

bluff-node port to node from "Beautiful graphs in Javascript library bluff
JavaScript
1
star
22

S2Dao.PHP5-Plugin

Eclipse plugin; support your s2dao.php5 development
Java
1
star
23

MessageResource.io

Io
1
star
24

Hermit

PHP DAO(Data Access Object) framework
PHP
1
star
25

nowelium.github.com

github page
JavaScript
1
star
26

Chariot

HTML Template Engine
PHP
1
star
27

php-memcached-server

php memcached server
PHP
1
star
28

PSTParser

PHP
1
star
29

Singa

php concurrent-thread framework
PHP
1
star