diff options
| author | Garrett D'Amore <garrett@damore.org> | 2024-04-21 12:23:07 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-04-21 12:23:07 -0700 |
| commit | 56507ab5c4db009be5251bde832f594fe5ed3d5e (patch) | |
| tree | c70e7d669c3548a5c58ab27c0fc6118a96580863 /src/core/pipe.h | |
| parent | 3593eba5272bf627b99a2521b3f025141a49bcad (diff) | |
| download | nng-56507ab5c4db009be5251bde832f594fe5ed3d5e.tar.gz nng-56507ab5c4db009be5251bde832f594fe5ed3d5e.tar.bz2 nng-56507ab5c4db009be5251bde832f594fe5ed3d5e.zip | |
Logging improvements (#1816)
* Add nng_str_sockaddr to get string representation of socket address.
* Added nng_log_get_level() is meant to allow users to obtain the
current level and avoid some possibly expensive operations just
to collect debugging information when debugging is not in effect.
We use a custom logger for NUTS, and this fits within the NUTS
test framework well, so that if -v is supplied we get more content.
All tests now get this by default.
Diffstat (limited to 'src/core/pipe.h')
| -rw-r--r-- | src/core/pipe.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/core/pipe.h b/src/core/pipe.h index 458a42d9..a1bc361e 100644 --- a/src/core/pipe.h +++ b/src/core/pipe.h @@ -1,5 +1,5 @@ // -// Copyright 2021 Staysail Systems, Inc. <info@staysail.tech> +// Copyright 2024 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 @@ -17,6 +17,7 @@ #include "core/defs.h" #include "core/thread.h" +#include "nng/nng.h" #include "sp/transport.h" // AIO @@ -61,4 +62,6 @@ extern void nni_pipe_bump_rx(nni_pipe *, size_t); extern void nni_pipe_bump_tx(nni_pipe *, size_t); extern void nni_pipe_bump_error(nni_pipe *, int); +extern char *nni_pipe_peer_addr(nni_pipe *p, char buf[NNG_MAXADDRSTRLEN]); + #endif // CORE_PIPE_H |
