Commit graph

18 commits

Author SHA1 Message Date
Dave Collins
e7abb08b6b Fix a comment typo. 2013-05-09 21:24:47 -05:00
Dave Collins
149d77ad3f Add negative tests for ReadMessage.
This commit adds tests for the error paths when reading the initial
message header and message payload from the wire.
2013-05-09 21:23:06 -05:00
Dave Collins
aa4086a1b1 Update test coverage report. 2013-05-09 21:13:37 -05:00
Dave Collins
ec6ebb3916 Add initial implementation of MessageError type.
This commit adds a new MessageError type that is intended to allow the
caller to differentiate between general io errors and and errors that
resulted from malformed messages.
2013-05-09 20:58:17 -05:00
Dave Collins
6286a39378 Combine readMessage with ReadMessage.
These functions used to be split into multiple files, but since the code
was reorganized there is no longer any reason to split them.
2013-05-09 20:16:46 -05:00
Dave Collins
d829f688b9 Fix comment typo. 2013-05-09 18:12:11 -05:00
Dave Collins
970b9c129d Remove dead error check.
The io.ReadFull function always returns an error if the full payload can't
be read, so there is no reason to further check if the payload length
matches after a successful read.
2013-05-09 15:23:31 -05:00
Dave Collins
4c160efc96 Fix a minor typo in the package overview doco. 2013-05-09 13:57:44 -05:00
Matthew Dempsky
4fc0089f63 Fix typo: s/MsgPong/MsgPing/ 2013-05-09 12:26:23 -06:00
Dave Collins
cdc17121b8 Display correct import path for gocov.
This was pointed out by kaptin on IRC.
2013-05-09 13:19:09 -05:00
Dave Collins
c369c0c16e Correct discardInput comment for buffer size.
This was pointed out by kaptin on IRC.
2013-05-09 13:00:00 -05:00
Dave Collins
3cd90355df Correct error output string colon placement. 2013-05-09 11:36:29 -05:00
Dave Collins
5e416389b1 Add negative tests for MsgPing.
This commit add tests the error paths when encoding and decoding MsgPing.
2013-05-09 10:42:52 -05:00
Dave Collins
bf5c0b58d8 Fix a few comment typos. 2013-05-09 00:02:07 -05:00
Dave Collins
e473fd6eb8 Add message tests for MsgAlert and MsgMemPool. 2013-05-09 00:01:29 -05:00
Dave Collins
ff7d582c66 Remove a few unused variables and constants. 2013-05-08 22:59:45 -05:00
Dave Collins
69b27dd5d3 Initial implementation. 2013-05-08 18:58:29 -05:00
Dave Collins
b4ebd0057b Initial commit. 2013-05-08 14:16:41 -05:00