Method: Agoo.unsubscribe

Defined in:
ext/agoo/agoo.c

.unsubscribe(subject) ⇒ Object

call-seq: unsubscribe(subject)

Unsubscribes on client listeners on the specified subject. Subjects are normally Strings but Symbols can also be used as can any other object that responds to #to_s.



82
83
84
85
86
87
88
89
# File 'ext/agoo/agoo.c', line 82

static VALUE
ragoo_unsubscribe(VALUE self, VALUE subject) {
    rb_check_type(subject, T_STRING);

    agoo_server_publish(agoo_pub_unsubscribe(NULL, StringValuePtr(subject), (int)RSTRING_LEN(subject)));

    return Qnil;
}