+// /ctdl/a/biff returns the number of new messages that have arrived in the inbox
+// since the beginning of the session or since the last call to biff
+void biff(struct http_transaction *h, struct ctdlsession *c) {
+ char biffbuff[1024];
+
+ ctdl_printf(c, "BIFF"); // send the command
+ ctdl_readline(c, biffbuff, sizeof(biffbuff)); // read the result
+ h->response_code = 200;
+ h->response_string = strdup("OK");
+ add_response_header(h, strdup("Content-type"), strdup("text/plain"));
+ h->response_body = strdup(&biffbuff[4]);
+ h->response_body_length = strlen(h->response_body);
+}
+
+