Commit Graph

26 Commits

Author SHA1 Message Date
43f7497424 Simplify tagged union 2026-01-23 22:17:21 -05:00
4106679262 things are SOOOO good.... 2026-01-19 17:55:54 -05:00
cc765dc91b Start adding connection message 2026-01-19 14:08:27 -05:00
c66b95bf89 Write relay message to the network 2026-01-19 12:59:21 -05:00
9947c21b4c Arrange bytes for relay 2026-01-19 12:12:23 -05:00
1a817df18d Mostly done with parsing and serializing messages 2026-01-17 16:06:47 -05:00
0d9c0c33fa 2026-01-14 19:34:35 -05:00
b39603522f 2025-11-14 14:47:56 -05:00
fc329d1064 2025-10-13 13:28:41 -04:00
b06cb6dada it works well! 2025-09-23 16:22:57 -04:00
c72503fce6 Fix extra bytes in connection message. 2025-05-11 13:40:23 -04:00
583f9d8b8f Add comments and fix tests
Also added networkBytesAsValue and restored bytesAsValue.
These are useful for treating the bytes from the network directly as a Message.
Otherwise, the init function would overwrite the packet type and length to be correct.
I would like the message handling to fail if the message body is incorrect.
2025-05-10 21:46:53 -04:00
245dab4909 Use slice for init, and add better error sets.
The slice sets us avoid allocating within the init function.
This means init can't fail, and it also makes it easier to stack allocate messages (slice an array buffer, instead of creating a stack allocator).
2025-05-10 21:46:53 -04:00
cde5c3626c 2025-05-10 21:46:53 -04:00
e84d1a2300 2025-05-10 21:46:53 -04:00
1b7d9bbb1a Remove bytesAsValueUnchecked
Callers can instead use std.mem.bytesAsValue directly.
2025-05-10 21:46:53 -04:00
1512ec1a86 Cleanup asBytes and test it 2025-05-10 21:46:53 -04:00
f1dce257be Simplify init interface 2025-05-10 21:46:53 -04:00
bcab1e4d00 2025-05-10 21:46:53 -04:00
0e8f016978 Align the bytes instead of the struct 2025-05-10 21:46:53 -04:00
fc53e87389 2025-05-10 21:46:53 -04:00
cbf554e853 2025-05-10 21:46:53 -04:00
775212013f 2025-05-10 21:46:53 -04:00
339ac5cfe5 2025-05-10 21:46:53 -04:00
eacfaffb6b 2025-05-10 21:46:53 -04:00
23f7ad8f94 Break out the impl to a lib
This will make it easier to make a C library.
2025-04-13 17:14:18 -04:00