Skip to content

Commit

Permalink
cleanup + flash socket support
Browse files Browse the repository at this point in the history
  • Loading branch information
jeromeetienne committed Mar 2, 2011
1 parent a74f568 commit 6e1980c
Show file tree
Hide file tree
Showing 85 changed files with 48 additions and 4,644 deletions.
1 change: 1 addition & 0 deletions contrib/chat/index.html
@@ -1,3 +1,4 @@
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="main.css" />
Expand Down
4 changes: 2 additions & 2 deletions contrib/monitor/index.html
Expand Up @@ -2,11 +2,11 @@
<html>
<head>
<link rel="stylesheet" href="main.css" />

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script>
<script src="jQuery.url.js"></script>
<!-- json2 is included because some browsers doesnt have it (e.g. ie8) -->
<script src="http://ajax.cdnjs.com/ajax/libs/json2/20110223/json2.js"></script>
<script src="http://ajax.cdnjs.com/ajax/libs/json2/20110223/json2.js"></script>
<script src="../../easyWebSocket.min.js"></script>
<script src="https://github.com/joewalnes/smoothie/raw/master/smoothie.js"></script>
<script src="main.js"></script>
Expand Down
7 changes: 4 additions & 3 deletions easyWebSocket-node.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions easyWebSocket.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions example/devel-gapp.html
@@ -1,3 +1,4 @@
<!doctype html>
<html>
<head>
<script src="../gapp/easyWebSocket-gapp.js"></script>
Expand Down
4 changes: 3 additions & 1 deletion example/devel-node.html
@@ -1,7 +1,9 @@
<!doctype html>
<html>
<head>
<!-- json2 is included because some browsers doesnt have it (e.g. ie8) -->
<script src="http://ajax.cdnjs.com/ajax/libs/json2/20110223/json2.js"></script>
<script src="http://ajax.cdnjs.com/ajax/libs/json2/20110223/json2.js"></script>

<script src="../node/server/node_modules/socket.io/support/socket.io-client/socket.io.js"></script>
<script src="../node/easyWebSocket-node.js"></script>
<!-- <script src="../easyWebSocket-node.min.js"></script>
Expand Down
4 changes: 2 additions & 2 deletions example/example.html
@@ -1,6 +1,6 @@
<!doctype html>
<html>
<head>
</head>
<head></head>
<body>
<!-- json2 is included because some browsers doesnt have it (e.g. ie8) -->
<script src="http://ajax.cdnjs.com/ajax/libs/json2/20110223/json2.js"></script>
Expand Down
15 changes: 12 additions & 3 deletions node/easyWebSocket-node.js
Expand Up @@ -6,7 +6,6 @@
* is not suitable
*/


/**
* Constructor
*
Expand All @@ -27,7 +26,7 @@ EasyWebSocket = function(url, protocols)

// define the class logging function
this.log = EasyWebSocket.logFunction;

// init default binding
this["onopen"] = function(){ self.log("default onopen method"); }
this["onmessage"] = function(){ self.log("default onmessage method"); }
Expand All @@ -48,7 +47,17 @@ EasyWebSocket.prototype._sioCtor = function()
var serverUrl = this.parseUri(EasyWebSocket.serverUrl);
var listenHost = serverUrl.host;
var listenPort = parseInt(serverUrl.port);
this._sockio = new io.Socket(listenHost, {port: listenPort, rememberTransport: false});

// configure the swf for the flash websocket
// - NOTE: not sure about this. i dont understand flash 'security'
WEB_SOCKET_SWF_LOCATION = 'http://easywebsocket.org/node/server/node_modules/socket.io/support/socket.io-client/lib/vendor/web-socket-js/WebSocketMainInsecure.swf';

// create and config the socket
this._sockio = new io.Socket(listenHost, {
port : listenPort,
rememberTransport : false,
transports : ['websocket', 'flashsocket', 'htmlfile', 'xhr-multipart', 'xhr-polling']
});
this._sockio.connect();
this._sockio.on('connect', function(){
self.log("socket connected", self._sockio, self._clientId)
Expand Down
4 changes: 2 additions & 2 deletions node/server/cluster.js
Expand Up @@ -6,9 +6,9 @@
var cluster = require('cluster');

cluster('./server.js')
.use(cluster.logger('logs'))
//.use(cluster.logger('logs'))
//.use(cluster.pidfiles('pids'))
.use(cluster.stats())
.use(cluster.pidfiles('pids'))
.use(cluster.cli())
.use(cluster.repl(8888))
.listen(8667);
1 change: 0 additions & 1 deletion node/server/logs/.gitignore

This file was deleted.

Binary file removed node/server/node_modules/cluster/._History.md
Binary file not shown.
Binary file removed node/server/node_modules/cluster/._Readme.md
Binary file not shown.
Binary file removed node/server/node_modules/cluster/._package.json
Binary file not shown.
Binary file removed node/server/node_modules/cluster/._test.js
Binary file not shown.
3 changes: 0 additions & 3 deletions node/server/node_modules/cluster/.gitignore

This file was deleted.

3 changes: 0 additions & 3 deletions node/server/node_modules/cluster/.gitmodules

This file was deleted.

6 changes: 0 additions & 6 deletions node/server/node_modules/cluster/.npmignore

This file was deleted.

112 changes: 0 additions & 112 deletions node/server/node_modules/cluster/History.md

This file was deleted.

22 changes: 0 additions & 22 deletions node/server/node_modules/cluster/LICENSE

This file was deleted.

8 changes: 0 additions & 8 deletions node/server/node_modules/cluster/Makefile

This file was deleted.

0 comments on commit 6e1980c

Please sign in to comment.