Matt Joiner
ff835db955
Actually fix #41 properly; and several big changes
...
bencode:
* Handle omitempty on non-trivial types.
cmd/dht-ping:
* Handle timeouts in ping transactions.
dht:
* Propagate failed transaction responses properly.
* Msg related tests are moved into their own file.
* In some places, IPs in binary form are shorted to 4 bytes if IPv4.
2015-12-07 03:28:28 +11:00
Matt Joiner
47a2453098
bencode: Can't get zero type of a nil interface
2015-10-23 12:37:30 +11:00
Matt Joiner
837bdd2ccf
bencode: Rethrow non-errors during encoding
2015-10-23 12:36:47 +11:00
Matt Joiner
1fb64de07c
bencode: Encoding nil interfaces are an error except at data root
2015-10-23 12:35:38 +11:00
Matt Joiner
4b539b1f11
bencode: Don't skip encoding nil pointers and interfaces
...
This caused an annoying bug for complex types where dictionary values went missing.
2015-10-19 01:28:36 +11:00
Matt Joiner
ddf7cbbdac
bencode: Use default field name if it isn't given (but options are)
2015-10-19 01:27:15 +11:00
Matt Joiner
644ee0a244
bencode: Tidy up
2015-10-19 01:25:56 +11:00
nsf
e553531a10
Fix bugs, implement missing bits. Made a mess, can't describe properly.
2012-06-28 02:21:26 +06:00
nsf
110956d936
Fix Marshaler case.
2012-06-24 17:10:53 +06:00
nsf
8db0c29da9
Add bufio.Writer error handling, move Flush to the internal code.
2012-06-24 16:59:04 +06:00
nsf
a68e4a6f5a
Initial commit.
2012-06-20 19:21:32 +06:00