diff options
| author | Garrett D'Amore <garrett@damore.org> | 2019-01-21 22:40:10 -0800 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2019-02-16 19:22:27 -0800 |
| commit | 5cf750697624d4fd63cfe26921209d7c30e1a2d2 (patch) | |
| tree | bf11695e5f1ec5e400c87da0cc6ff23935a2eeff /tests/stubs.h | |
| parent | ca655b9db689ee0e655248b1a9f166b8db6cc984 (diff) | |
| download | nng-5cf750697624d4fd63cfe26921209d7c30e1a2d2.tar.gz nng-5cf750697624d4fd63cfe26921209d7c30e1a2d2.tar.bz2 nng-5cf750697624d4fd63cfe26921209d7c30e1a2d2.zip | |
fixes #872 create unified nng_stream API
This is a major change, and includes changes to use a polymorphic
stream API for all transports. There have been related bugs fixed
along the way. Additionally the man pages have changed.
The old non-polymorphic APIs are removed now. This is a breaking
change, but the old APIs were never part of any released public API.
Diffstat (limited to 'tests/stubs.h')
| -rw-r--r-- | tests/stubs.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/stubs.h b/tests/stubs.h index c34bed7a..a8fa59e9 100644 --- a/tests/stubs.h +++ b/tests/stubs.h @@ -85,6 +85,15 @@ nosocket(nng_socket *s) return (NNG_ENOTSUP); } +uint16_t +test_htons(uint16_t in) +{ +#ifdef NNG_LITTLE_ENDIAN + in = ((in >> 8) & 0xff) | ((in & 0xff) << 8); +#endif + return (in); +} + #ifndef NNG_HAVE_REQ0 #define nng_req0_open nosocket #endif |
