PrimusEmitter 0.0.5

PrimusEmitter 0.0.5

TestsTested
LangLanguage Obj-CObjective C
License MIT
ReleasedLast Release Feb 2015

Maintained by Nuno Sousa.



  • By
  • Seegno

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.

Build Status

Use it

pod 'PrimusEmitter'

Quick Start

#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();
    }];
}

Credits

Many thanks to Jonathan Brumley, creator of the original primus-emitter plugin.