Motr
M0
|
#include <rpc_machine.h>
Data Fields | |
void * | mw_datum |
struct m0_rpc_machine * | mw_mach |
struct m0_tlink | mw_linkage |
void(* | mw_conn_added )(struct m0_rpc_machine_watch *w, struct m0_rpc_conn *conn) |
void(* | mw_session_added )(struct m0_rpc_machine_watch *w, struct m0_rpc_session *session) |
void(* | mw_mach_terminated )(struct m0_rpc_machine_watch *w) |
uint64_t | mw_magic |
RPC machine watch is a suite of call-backs invoked by the rpc code when new connection or session is created within the rpc machine the watch is attached to.
Call-backs are invoked under the rpc machine lock.
Definition at line 225 of file rpc_machine.h.
void(* mw_conn_added) (struct m0_rpc_machine_watch *w, struct m0_rpc_conn *conn) |
This is invoked when a connection is added to one of the rpc machine connection lists. The connection is in M0_RPC_CONN_INITIALISED state.
Definition at line 244 of file rpc_machine.h.
void* mw_datum |
Datum that can be used to associate additional state to the watcher.
Definition at line 229 of file rpc_machine.h.
struct m0_tlink mw_linkage |
Linkage into m0_rpc_machine::rm_watch list of all watches for this machine.
Definition at line 239 of file rpc_machine.h.
struct m0_rpc_machine* mw_mach |
RPC machine this watcher is attached to. This field must be set before calling m0_rpc_machine_watch_attach().
Definition at line 234 of file rpc_machine.h.
void(* mw_mach_terminated) (struct m0_rpc_machine_watch *w) |
This call-back is called when the rpc machine is terminated, while still having attached watches. The watch is removed from the watch list before this call-back is invoked. There is neither need nor harm in calling m0_rpc_machine_watch_detach() once this call-back was invoked.
Definition at line 260 of file rpc_machine.h.
uint64_t mw_magic |
Definition at line 263 of file rpc_machine.h.
void(* mw_session_added) (struct m0_rpc_machine_watch *w, struct m0_rpc_session *session) |
This is called when a session is added to the connection list of sessions (m0_rpc_conn::c_sessions). The session is in M0_RPC_SESSION_INITIALISED state.
Definition at line 251 of file rpc_machine.h.