Skip to content

Instantly share code, notes, and snippets.

@xdenser
Created October 18, 2011 23:17
Show Gist options
  • Save xdenser/1297043 to your computer and use it in GitHub Desktop.
Save xdenser/1297043 to your computer and use it in GitHub Desktop.
Emiting events
...
void SteveNode::myEmit(int argc, Handle<Value> argv[]) {
char emitType[256];
argv[0]->ToString()->WriteAscii(emitType,0,-1);
if (showDebugMessages==1) printf("\nnode-steve.node - myEmit: %s", emitType);
HandleScope scope;
// ** complete this method such that the 'success' event is received in JavaScript by the registered listener **
node::MakeCallback(handle_,"emit",argc,argv);
}
...
@SteveDCronin
Copy link

Solution provided by Denys Khanzhiyev

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment