Anonymous avatar Anonymous committed 23e088e

compilation work

Comments (0)

Files changed (5)

daemon/orbited/js_src/Orbited.js

+jsio('import Class');
+jsio('from jsio.protocols.mspp import MSPPStream, MSPPProtocol');
+
+// autodetect host + port!!!
+exports.settings = { 'host': 'localhost', 'port': 8000, 'path': '/csp'};
+exports.internal = { 'multiplexer': null };
+
+exports.TCPSocket = Class(MSPPStream, function() {
+    this.init = function() {
+        this.setEncoding('plain');
+        if (exports.internal.multiplexer == null) {
+            exports.internal.multiplexer = new MSPPProtocol();
+            exports.internal.multiplexer.setTransport('csp', {"url": "http://" + exports.settings.host + ":" + exports.settings.port + exports.settings.path});
+        }
+        this.setMultiplexer(exports.internal.multiplexer);
+    }
+});

daemon/orbited/js_src/compile.sh

-#!/bin/env bash
-jsio_compile orbited.pkg -j /home/desmaj/projects/js.io/jsio -o ../static/orbited.js
+#!/bin/bash
+jsio_compile orbited.pkg -j /home/mario/Desktop/js.io/jsio -o ../static/Orbited.js

daemon/orbited/js_src/orbited.js

-jsio('import jsio.env.browser.mspp');
-
-exports.settings = mspp.settings;
-exports.TCPSocket = mspp.TCPSocket;

daemon/orbited/js_src/orbited.pkg

 {
-    "root": "orbited",
+    "root": "Orbited",
     "transports": ["csp"],
     "environments": ["browser"],
     "additional_dependancies": [ ]

daemon/orbited/jsiotest.html

-<html>
- <head>
-  <script src="jsio/jsio.js"></script>
-  <script>
-    onload = function() {
-        jsio('import Class');
-        jsio('from jsio.protocols.mspp import MSPPStream, MSPPProtocol');
-
-        Orbited = {};
-        Orbited.settings = {};
-        Orbited.settings.host = "localhost";
-        Orbited.settings.port = 8000;
-        Orbited.multiplexer = null;
-
-        Orbited.TCPSocket = Class(MSPPStream, function() {
-            this.init = function() {
-                this.setEncoding('plain');
-                if (Orbited.multiplexer == null) {
-                    Orbited.multiplexer = new MSPPProtocol();
-                    Orbited.multiplexer.setTransport('csp', {"url": "http://" + Orbited.settings.host + ":" + Orbited.settings.port + "/csp"});
-                }
-                this.setMultiplexer(Orbited.multiplexer);
-            }
-        });
-
-        socket = new Orbited.TCPSocket();
-        socket.onopen = function() { console.log('connected'); }
-        socket.onclose = function(err) { console.log('close: '+err); }
-        socket.onread = function(data) { console.log('read: '+data); }
-        socket.open('localhost', 8888);
-    };
-  </script>
- </head>
- <body></body>
-</html>
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.