diff options
Diffstat (limited to 'src/core/socket.h')
| -rw-r--r-- | src/core/socket.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/core/socket.h b/src/core/socket.h index 4b9c4642..5486918e 100644 --- a/src/core/socket.h +++ b/src/core/socket.h @@ -25,6 +25,7 @@ extern uint16_t nni_sock_peer_id(nni_sock *); extern const char *nni_sock_proto_name(nni_sock *); extern const char *nni_sock_peer_name(nni_sock *); extern void * nni_sock_proto_data(nni_sock *); +extern void nni_sock_add_stat(nni_sock *, nni_stat_item *); extern struct nni_proto_pipe_ops *nni_sock_proto_pipe_ops(nni_sock *); @@ -107,4 +108,12 @@ extern int nni_ctx_getopt( extern int nni_ctx_setopt( nni_ctx *, const char *, const void *, size_t, nni_opt_type); +// nni_sock_bump_rx is called by a protocol when a message is received by +// a consuming app. It bumps the rxmsgs by one and rxbytes by the size. +extern void nni_sock_bump_rx(nni_sock *s, uint64_t sz); + +// nni_sock_bump_rx is called by a protocol when a message is sent by +// a consuming app. It bumps the txmsgs by one and txbytes by the size. +extern void nni_sock_bump_tx(nni_sock *s, uint64_t sz); + #endif // CORE_SOCKET_H |
