Skip to content
This repository was archived by the owner on Feb 21, 2019. It is now read-only.

Socket.io update #23

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions node.server/flux.orion.integration/FluxEditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ define(function (require) {

require('lib/sha1'); //Not AMD defines 'CryptoJS global variable.

var io = require('lib/socket.io');
var io = require('socketio');
var Deferred = require('orion/Deferred');
var authorize = require('authorize');

Expand Down Expand Up @@ -72,10 +72,10 @@ var FluxEditor = (function() {
FluxEditor.prototype = /**@lends eclipse.FluxEditor.prototype */
{
_createSocket: function (user) {
this.socket = io.connect(
this._host, {
port: this._port
this.socket = io({
transports : ['websocket']
});
this.socket.connect('http://' + this._host + ':' + this._port);

this._resourceUrl = null;

Expand Down
11 changes: 6 additions & 5 deletions node.server/flux.orion.integration/FluxFileSystem.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,8 @@
******************************************************************************/
/*global define console CryptoJS */
define(function(require) {

var Deferred = require('orion/Deferred');
var io = require('lib/socket.io');
var io = require('socketio');
require('lib/sha1'); //Not AMD. Defines 'CryptoJS global.

var authorize = require('authorize');
Expand Down Expand Up @@ -103,11 +102,13 @@ var FluxFileSystem = (function() {
console.log('STOP! no second socket!');
return;
}

console.log('Create socket for ', user);
this._connectedToChannel = new Deferred();
this.socket = io.connect(this._host, {
port: this._port
});
this.socket = io({
transports : ['websocket']
});
this.socket.connect('http://' + this._host + ':' + this._port);

var self = this;

Expand Down
7 changes: 4 additions & 3 deletions node.server/flux.orion.integration/OpenDeclaration.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

define(function (require) {

var io = require('lib/socket.io');
var io = require('socketio');
var Deferred = require('orion/Deferred');
var authorize = require('authorize');

Expand Down Expand Up @@ -41,9 +41,10 @@ var OpenDeclaration = (function() {
OpenDeclaration.prototype = /**@lends flux.NavigateAction.prototype */
{
_createSocket: function (user) {
this.socket = io.connect(this._host, {
port: this._port
this.socket = io({
transports : ['websocket']
});
this.socket.connect('http://' + this._host + ':' + this._port);

this._resourceUrl = null;

Expand Down
3 changes: 3 additions & 0 deletions node.server/flux.orion.integration/flux.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@

/*global require window location console*/
require.config({
paths: {
socketio: '/socket.io/socket.io'
},
packages: [
{name: "when", location: "bower_components/when", main: "when"},
{name: "rest", location: "bower_components/rest", main: "rest"}
Expand Down
Loading