small tune of IPC interface.

This commit is contained in:
Cheng Zhao 2013-04-23 20:57:14 +08:00
parent d28f51fb9c
commit 8f0b2b6363
8 changed files with 25 additions and 21 deletions

View file

@ -4,12 +4,12 @@ send = process.atom_binding('ipc').send
class Ipc extends EventEmitter
constructor: ->
process.on 'ATOM_INTERNAL_MESSAGE', (args...) =>
@emit('message', args...)
@emit(args...)
send: (args...) ->
@sendChannel('ATOM_INTERNAL_MESSAGE', args...)
@sendChannel('message', args...)
sendChannel: (args...) ->
send(args...)
send('ATOM_INTERNAL_MESSAGE', args...)
module.exports = new Ipc