Changing router to application shared memory exchange protocol.
The application process needs to request the shared memory segment from the router instead of the latter pushing the segment before sending a request to the application. This is required to simplify the communication between the router and the application and to prepare the router for using the application shared port and then the queue.
This commit is contained in:
@@ -20,6 +20,7 @@ enum {
|
||||
NXT_UNIT_OK = 0,
|
||||
NXT_UNIT_ERROR = 1,
|
||||
NXT_UNIT_AGAIN = 2,
|
||||
NXT_UNIT_CANCELLED = 3,
|
||||
};
|
||||
|
||||
enum {
|
||||
@@ -188,16 +189,6 @@ struct nxt_unit_read_info_s {
|
||||
*/
|
||||
nxt_unit_ctx_t *nxt_unit_init(nxt_unit_init_t *);
|
||||
|
||||
/*
|
||||
* Process received message, invoke configured callbacks.
|
||||
*
|
||||
* If application implements it's own event loop, each datagram received
|
||||
* from port socket should be initially processed by unit. This function
|
||||
* may invoke other application-defined callback for message processing.
|
||||
*/
|
||||
int nxt_unit_process_msg(nxt_unit_ctx_t *,
|
||||
void *buf, size_t buf_size, void *oob, size_t oob_size);
|
||||
|
||||
/*
|
||||
* Main function useful in case when application does not have it's own
|
||||
* event loop. nxt_unit_run() starts infinite message wait and process loop.
|
||||
|
||||
Reference in New Issue
Block a user