diff options
| author | Garrett D'Amore <garrett@damore.org> | 2019-02-18 20:15:16 -0800 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2019-02-23 11:50:17 -0800 |
| commit | 64e784237d143aa032311942bc44abd22e1e4114 (patch) | |
| tree | e3ea529d5e5adfd022773ab207622cc2247f057c /src/core/sockimpl.h | |
| parent | d210ef96517c1462bc058c95bced8c27b5e19c4f (diff) | |
| download | nng-64e784237d143aa032311942bc44abd22e1e4114.tar.gz nng-64e784237d143aa032311942bc44abd22e1e4114.tar.bz2 nng-64e784237d143aa032311942bc44abd22e1e4114.zip | |
fixes #848 server hang waiting for client handshake
fixes #698 Need TCP stats
fixes #699 Need IPC stats
fixes #701 Need TLS stats
This commit addresses a problem when negotiating using one of the stream
based negotiation APIs -- a slow or misbehaving peer can prevent well
behaved ones from establishing a connection. The fix is a fairly
significant change in how these transports link up, and it does rely
on the fact that the socket only has a single accept() or connect()
pending at a time (on a given endpoint that is).
While here, we have completely revamped the way transport statistics are
done, offering a standard API for collecting these statistics.
Unfortunately, this completely borks the statistics for inproc. As we
are planning to change the way inproc works soon, in order to provide
more control and work on performance fixes for the message queue, we feel
this is an acceptable trade-off. Furthermore, almost nobody uses inproc
for anything, and even fewer people are making use of the statistics
at this time.
Diffstat (limited to 'src/core/sockimpl.h')
| -rw-r--r-- | src/core/sockimpl.h | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/src/core/sockimpl.h b/src/core/sockimpl.h index 5a9a2589..ffe6c6e8 100644 --- a/src/core/sockimpl.h +++ b/src/core/sockimpl.h @@ -1,5 +1,5 @@ // -// Copyright 2018 Staysail Systems, Inc. <info@staysail.tech> +// Copyright 2019 Staysail Systems, Inc. <info@staysail.tech> // Copyright 2018 Capitar IT Group BV <info@capitar.com> // // This software is supplied under the terms of the MIT License, a @@ -23,11 +23,14 @@ typedef struct nni_dialer_stats { nni_stat_item s_npipes; nni_stat_item s_connok; nni_stat_item s_refused; + nni_stat_item s_discon; nni_stat_item s_canceled; - nni_stat_item s_timedout; nni_stat_item s_othererr; - nni_stat_item s_protorej; - nni_stat_item s_apprej; + nni_stat_item s_etimedout; + nni_stat_item s_eproto; // protocol error + nni_stat_item s_eauth; + nni_stat_item s_enomem; + nni_stat_item s_reject; char s_scope[24]; // scope name for stats } nni_dialer_stats; @@ -64,12 +67,14 @@ typedef struct nni_listener_stats { nni_stat_item s_url; nni_stat_item s_npipes; nni_stat_item s_accept; - nni_stat_item s_aborted; // aborted remotely - nni_stat_item s_timedout; + nni_stat_item s_discon; // aborted remotely nni_stat_item s_canceled; nni_stat_item s_othererr; - nni_stat_item s_protorej; - nni_stat_item s_apprej; + nni_stat_item s_etimedout; + nni_stat_item s_eproto; // protocol error + nni_stat_item s_eauth; + nni_stat_item s_enomem; + nni_stat_item s_reject; char s_scope[24]; // scope name for stats } nni_listener_stats; @@ -97,6 +102,10 @@ typedef struct nni_pipe_stats { nni_stat_item s_id; nni_stat_item s_ep_id; nni_stat_item s_sock_id; + nni_stat_item s_rxmsgs; + nni_stat_item s_txmsgs; + nni_stat_item s_rxbytes; + nni_stat_item s_txbytes; char s_scope[16]; // scope name for stats ("pipe" is short) } nni_pipe_stats; |
