Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Socket.io 0.7

  • Loading branch information...
commit 1350712893e64d566335787c50f4fc7ddb03b1d7 1 parent 24457e2
@unconed authored
View
2  Cocoa/TermKit/TermKit.xcodeproj/project.pbxproj
@@ -255,7 +255,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
- shellScript = "html=\"$TARGET_BUILD_DIR/$UNLOCALIZED_RESOURCES_FOLDER_PATH/HTML\"\nrm -rf \"$html/socket.io\"\nmkdir \"$html/socket.io\"\ncp -r ../../Node/socket.io-node/support/socket.io-client/* \"$html/socket.io\"";
+ shellScript = "html=\"$TARGET_BUILD_DIR/$UNLOCALIZED_RESOURCES_FOLDER_PATH/HTML\"\nrm -rf \"$html/socket.io\"\nmkdir \"$html/socket.io\"\ncp -r ../../Node/node_modules/socket.io-client/* \"$html/socket.io\"";
};
/* End PBXShellScriptBuildPhase section */
View
7 HTML/client/client.js
@@ -13,8 +13,8 @@ var tc = termkit.client = function () {
this.onConnect = function () {};
this.onDisconnect = function () {};
- // Set up socket with back-end.
- var s = this.socket = new io.Socket('localhost', { port: 2222 });
+ // Open socket to back-end.
+ var s = this.socket = io.connect('http://localhost:2222', { });
// Use shared protocol handler with back-end.
this.protocol = new termkit.protocol(this.socket, this);
@@ -25,9 +25,6 @@ var tc = termkit.client = function () {
s.on('disconnect', function() {
that.onDisconnect();
});
-
- // Open connection.
- s.connect();
};
tc.prototype = {
View
4 HTML/index.html
@@ -2,11 +2,11 @@
<html lang="en">
<head>
<meta charset="utf-8">
- <title>TermKit - UI prototype</title>
+ <title>TermKit</title>
<!-- <script type="text/javascript" charset="utf-8" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.0/jquery.js"></script>-->
<script type="text/javascript" charset="utf-8" src="jquery.js"></script>
- <script type="text/javascript" charset="utf-8" src="socket.io/socket.io.js"></script>
+ <script type="text/javascript" charset="utf-8" src="socket.io/dist/socket.io.js"></script>
<script type="text/javascript" charset="utf-8" src="termkit.js"></script>
<script type="text/javascript" charset="utf-8" src="container.js"></script>
View
2  HTML/termkit.css
@@ -613,7 +613,7 @@ body {
-webkit-box-shadow: 0px -1px 1px rgba(192,192,192,1);
background: #777 -webkit-gradient(linear, left top, left bottom, from(#808080), to(#555));
- color: #eee;
+ color: #f2f2f2;
}
.termkitTokenField > span.token-pipe {
View
3  HTML/termkit.js
@@ -15,6 +15,9 @@ $(document).ready(function () {
});
};
+ $(document).mousedown(function () {
+ alert('wtf');
+ });
});
})(jQuery);
View
3  Node/misc.js
@@ -43,7 +43,8 @@ exports.composePath = function (name, path) {
/**
* Generator for decorator to track asynchronous tasks.
*
- * Allows you to execute a complicated dynamic callback hierarchy and call a handler when all marked callbacks have finished.
+ * Allows you to execute a complicated dynamic callback hierarchy and
+ * call a handler when all marked callbacks have finished.
*
* @param done
* Callback to call when all callbacks are done.
View
6 Node/nodekit.js
@@ -7,7 +7,7 @@ require.paths.unshift(__dirname + '/../Shared/');
// Load requirements.
var http = require('http'),
- io = require('./socket.io-node'),
+ io = require('socket.io-node'),
router = require("./router");
// Load config file.
@@ -23,7 +23,7 @@ var server = http.createServer(function (request, result) {
server.listen(2222);
// Set up WebSocket and handlers.
-var socket = io.listen(server);
-socket.on('connection', function (client) {
+var ioServer = io.listen(server);
+ioServer.sockets.on('connection', function (client) {
var p = new router.router(client);
});
View
2  Shared/protocol.js
@@ -104,7 +104,7 @@ exports.protocol.prototype = {
out.push(message);
console.log.apply(console, out);
}
- this.connection.send(message);
+ this.connection.json.send(message);
}
},
View
8 todo.txt
@@ -1,13 +1,7 @@
Tasks:
-[X] return process meta-data in environment
-[X] redefine ansi colors
-[X] make fileReader with same pattern as reader.js
-[X] cat multiple files -> octet-stream w/ type coercion
-[X] hex widget
-[X] hex utility
-[X] hex detection
[ ] autocomplete history
[ ] backgrounding / new command trigger
+
[ ] move escapeUnixText into front-end, unixLegacy widget
[ ] command aliases
[ ] async popup / completion keystroke buffering
Please sign in to comment.
Something went wrong with that request. Please try again.