Module: Agoo
- Defined in:
- ext/agoo/agoo.c,
lib/agoo.rb,
lib/agoo/base.rb,
lib/agoo/client.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: Base, Client, ErrorStream, RackLogger, Request, Response, Upgraded
Constant Summary collapse
- VERSION =
Agoo version.
'2.5.5'
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.
46 47 48 49 50 51 52 53 54 55 |
# File 'ext/agoo/agoo.c', line 46
VALUE
ragoo_publish(VALUE self, VALUE subject, VALUE message) {
int slen;
const char *subj = extract_subject(subject, &slen);
rb_check_type(message, T_STRING);
server_publish(pub_publish(subj, slen, StringValuePtr(message), (int)RSTRING_LEN(message)));
return Qnil;
}
|
.shutdown ⇒ Object
call-seq: shutdown()
Shutdown the server and logger.
32 33 34 35 36 37 |
# File 'ext/agoo/agoo.c', line 32 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.
65 66 67 68 69 70 71 72 |
# File 'ext/agoo/agoo.c', line 65
static VALUE
ragoo_unsubscribe(VALUE self, VALUE subject) {
rb_check_type(subject, T_STRING);
server_publish(pub_unsubscribe(NULL, StringValuePtr(subject), (int)RSTRING_LEN(subject)));
return Qnil;
}
|