+static void
+_rcb (struct rs_packet *packet, void *user_data)
+{
+ int err = 0;
+
+ /* When we're running the event loop for the user, we must break it
+ in order to give the control back to the user. */
+ err = event_base_loopbreak (packet->conn->evb);
+ if (err < 0)
+ rs_err_conn_push_fl (packet->conn, RSE_EVENT, __FILE__, __LINE__,
+ "event_base_loopbreak: %s",
+ evutil_gai_strerror(err));
+}
+
+/* Special function used in libradsec blocking dispatching mode,
+ i.e. with socket set to block on read/write and with no libradsec
+ callbacks registered.
+
+ For any other use of libradsec, a the received_cb callback should
+ be registered in the callbacks member of struct rs_connection.
+
+ On successful reception, verification and decoding of a RADIUS
+ message, PKT_OUT will upon return point at a pointer to a struct
+ rs_packet containing the message.
+
+ If anything goes wrong or if the read times out (TODO: explain),
+ PKT_OUT will point at the NULL pointer and one or more errors are
+ pushed on the connection (available through rs_err_conn_pop()). */
+