TestsTested | ✗ |
LangLanguage | Obj-CObjective C |
License | MIT |
ReleasedLast Release | Feb 2015 |
Maintained by Nuno Sousa.
Primus-Emitter-Objc is an implementation of the Primus-Emitter plugin for the Primus realtime framework.
The library is fully unit tested using Specta, Expecta and OCMockito.
pod 'PrimusEmitter'
#import <PrimusEmitter/PrimusEmitter.h>
- (void)start
{
// By emitting an event on the server-side, the following listener will fire
[primus on:@"custom:event:here", ^{
NSLog(@"Received custom event");
}];
// The last parameter is a block that you can execute to acknowlege the event
[primus on:@"another:example", ^(AckBlock ack) {
NSLog(@"Received another event. Calling callback...");
ack();
}];
}
Many thanks to Jonathan Brumley, creator of the original primus-emitter plugin.