Comments (5)
@slacktracer We've been monkey patching socket.io to support global configuration. I looks something like this for the client (AMD removed):
// file: socket.io-monkey.js
var _connect = io.connect;
io.connect = function(host, options) {
options = _.extend(options, io.connect.options);
return _connect.call(io, host, options);
};
io.connect.options = {};
It's not ideal, but it works. @incompl what do you think about extending cloak.run
to accept options? In light of #60, it might make sense to namespace socket.io options--something like:
clock.run('http://localhost:8090', {
'socket.io': {
resource: 'activities/example-mp/socket.io'
}
});
from cloak.
I think that's a great idea—
Greg
On Sun, Mar 23, 2014 at 4:58 PM, jugglinmike [email protected]
wrote:
@slacktracer We've been monkey patching socket.io to support global configuration. I looks something like this for the client (AMD removed):
// file: socket.io-monkey.js var _connect = io.connect; io.connect = function(host, options) { options = _.extend(options, io.connect.options); return _connect.call(io, host, options); }; io.connect.options = {};It's not ideal, but it works. @incompl what do you think about extending
cloak.run
to accept options? In light of #60, it might make sense to namespace socket.io options--something like:clock.run('http://localhost:8090', { 'socket.io': { resource: 'activities/example-mp/socket.io' } });
Reply to this email directly or view it on GitHub:
#69 (comment)
from cloak.
@jugglinmike Can you double check this PR for me? #74
from cloak.
Works now!
from cloak.
Great! Thank you!
Cloak is a awesome idea. I hope it keeps growing. Perhaps it can get independent from socket.io using primus. Wish I could contribute more. Thank you very much.
from cloak.
Related Issues (20)
- Add license to NPM package
- Update chat example to use Cloak 0.2.0
- Make Socket.io an optional dependency
- Lobby.pulse not firing HOT 1
- Trying to run grow21 example throws this error HOT 6
- Example how to use a Timer HOT 5
- misleading output when running cloak with `express` parameter HOT 2
- Missing tarball when downloading from npm. HOT 6
- Document new ability to add socket.io options to client.run HOT 1
- Client configuration passed to server during initial connection? HOT 5
- Create a new game room HOT 2
- Notifications about client connection lifecycle on server
- Control io heartbeat interval and timeout via server configuration HOT 5
- No issue but cry for help HOT 6
- Android API
- config.lobby.newMember invoked before config.clientEvents.begin? HOT 5
- client-side cloak.running? HOT 1
- Room seems to be ignoring its size HOT 1
- Maintenance HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cloak.