Module: Agoo
- Defined in:
- ext/agoo/agoo.c,
lib/agoo.rb,
lib/agoo/version.rb,
ext/agoo/agoo.c
Overview
A High Performance HTTP Server that supports the Ruby rack API. The word agoo is a Japanese word for a type of flying fish.
Defined Under Namespace
Modules: Log, Server Classes: ErrorStream, RackLogger, Request, Response, Upgraded
Constant Summary collapse
- VERSION =
Agoo version.
'2.5.1'
Class Method Summary collapse
-
.publish(subject, message) ⇒ Object
call-seq: publish(subject, message).
-
.shutdown ⇒ Object
call-seq: shutdown().
-
.unsubscribe(subject) ⇒ Object
call-seq: unsubscribe(subject).
Class Method Details
.publish(subject, message) ⇒ Object
call-seq: publish(subject, message)
Publish a message on the given subject. A subject is normally a String but Symbols can also be used as can any other object that responds to #to_s.
45 46 47 48 49 50 51 52 53 54 |
# File 'ext/agoo/agoo.c', line 45
VALUE
ragoo_publish(VALUE self, VALUE subject, VALUE message) {
int slen;
const char *subj = extract_subject(subject, &slen);
rb_check_type(message, T_STRING);
queue_push(&the_rserver.pub_queue, pub_publish(subj, slen, StringValuePtr(message), (int)RSTRING_LEN(message)));
return Qnil;
}
|
.shutdown ⇒ Object
call-seq: shutdown()
Shutdown the server and logger.
31 32 33 34 35 36 |
# File 'ext/agoo/agoo.c', line 31 static VALUE ragoo_shutdown(VALUE self) { agoo_shutdown(); debug_rreport(); return Qnil; } |
.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.
64 65 66 67 68 69 70 71 |
# File 'ext/agoo/agoo.c', line 64
static VALUE
ragoo_unsubscribe(VALUE self, VALUE subject) {
rb_check_type(subject, T_STRING);
queue_push(&the_rserver.pub_queue, pub_unsubscribe(NULL, StringValuePtr(subject), (int)RSTRING_LEN(subject)));
return Qnil;
}
|