summaryrefslogtreecommitdiff
path: root/testing/hstox/binary_encode.c
diff options
context:
space:
mode:
authoriphydf <iphydf@users.noreply.github.com>2017-01-20 17:03:30 +0000
committeriphydf <iphydf@users.noreply.github.com>2017-06-03 23:32:46 +0000
commitd4be41a3ad1ab01d7c5d475b353d9a1e3d17d31c (patch)
tree746b9c15bef07d156dc3f3ccacb299887ca2171c /testing/hstox/binary_encode.c
parenta8866fc17fd6c04860c8fa1f104297a5cd0cb9f2 (diff)
Use new encoding of `Maybe` in msgpack results.
The new encoding is `0` for `Nothing` and `[1, x]` for `Just x`.
Diffstat (limited to 'testing/hstox/binary_encode.c')
-rw-r--r--testing/hstox/binary_encode.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/testing/hstox/binary_encode.c b/testing/hstox/binary_encode.c
index 8809be28..aad94f5f 100644
--- a/testing/hstox/binary_encode.c
+++ b/testing/hstox/binary_encode.c
@@ -1,3 +1,4 @@
1#define _BSD_SOURCE
1#include "methods.h" 2#include "methods.h"
2 3
3#include "byteswap.h" 4#include "byteswap.h"
@@ -22,6 +23,11 @@ METHOD(array, Binary_encode, DhtPacket)
22 return pending; 23 return pending;
23} 24}
24 25
26METHOD(array, Binary_encode, DhtRequestPacket)
27{
28 return pending;
29}
30
25METHOD(array, Binary_encode, HostAddress) 31METHOD(array, Binary_encode, HostAddress)
26{ 32{
27 return pending; 33 return pending;
@@ -231,6 +237,7 @@ METHOD(array, Binary, encode)
231 } while (0) 237 } while (0)
232 DISPATCH(CipherText, BIN, bin); 238 DISPATCH(CipherText, BIN, bin);
233 DISPATCH(DhtPacket, ARRAY, array); 239 DISPATCH(DhtPacket, ARRAY, array);
240 DISPATCH(DhtRequestPacket, ARRAY, array);
234 DISPATCH(HostAddress, ARRAY, array); 241 DISPATCH(HostAddress, ARRAY, array);
235 DISPATCH(Word64, POSITIVE_INTEGER, u64); 242 DISPATCH(Word64, POSITIVE_INTEGER, u64);
236 DISPATCH(Key_PublicKey, BIN, bin); 243 DISPATCH(Key_PublicKey, BIN, bin);