electron/browser/api/lib/ipc.coffee

16 lines
415 B
CoffeeScript
Raw Normal View History

EventEmitter = require('events').EventEmitter
send = process.atom_binding('ipc').send
class Ipc extends EventEmitter
constructor: ->
process.on 'ATOM_INTERNAL_MESSAGE', (args...) =>
2013-04-23 12:57:14 +00:00
@emit(args...)
send: (process_id, routing_id, args...) ->
2013-04-23 12:57:14 +00:00
@sendChannel(process_id, routing_id, 'message', args...)
sendChannel: (args...) ->
2013-04-23 12:57:14 +00:00
send('ATOM_INTERNAL_MESSAGE', args...)
module.exports = new Ipc