freedomjs / radiatus

Multiuser web server for freedom.js
3 stars 0 forks source link

freedom v0.6 #11

Closed ryscheng closed 9 years ago

ryscheng commented 10 years ago

provider.js

var p = new Provider(def, console); p.onmessage('control', {channel: 'default', name: 'default', reverse: 'default'}); p.on('default', onMsg); p.getInterface().providePromises(constructor); p.onMessage('default', msg);

consumer.js

var interfaceCls = apiInterface.bind({}, def); var c = new Consumer(interfaceCls, console); p.onmessage('control', {channel: 'default', name: 'default', reverse: 'default'}); p.on('default', onMsg); p.onMessage('default', msg); p.getInterface() on both sides

ryscheng commented 9 years ago

Done https://github.com/freedomjs/radiatus/commit/4c30ecc64f91c9d074789d1ff7cb5a12737594d8