Port message fragmentation supported.
- Each sendmsg() transmits no more than port->max_size payload data. - Longer buffers are fragmented and send using multiple sendmsg() calls. - On receive side, buffers are connected in chain. - Number of handler calls is the same as number of nxt_port_socket_write() calls. - nxt_buf_make_plain() function introduced to make single plain buffer from the chain.
This commit is contained in:
@@ -106,6 +106,9 @@ typedef struct {
|
||||
|
||||
/* Message data send using mmap, next chunk is a nxt_port_mmap_msg_t. */
|
||||
uint8_t mmap; /* 1 bit */
|
||||
|
||||
uint8_t nf;
|
||||
uint8_t mf;
|
||||
} nxt_port_msg_t;
|
||||
|
||||
|
||||
@@ -171,6 +174,8 @@ struct nxt_port_s {
|
||||
nxt_lvlhsh_t rpc_streams; /* stream to nxt_port_rpc_reg_t */
|
||||
nxt_lvlhsh_t rpc_peers; /* peer to queue of nxt_port_rpc_reg_t */
|
||||
|
||||
nxt_lvlhsh_t frags;
|
||||
|
||||
nxt_atomic_t use_count;
|
||||
|
||||
nxt_process_type_t type;
|
||||
|
||||
Reference in New Issue
Block a user