Commit Graph

56 Commits

Author SHA1 Message Date
Christian Schwarz
74719ad846 rpc: chunk JSON parts of communication + refactoring
JSONDecoder was buffering more of connection data than just the JSON.
=> Unchunker didn't bother and just started unchunking.

While chaining JSONDecoder.Buffered() and the connection using
ChainedReader works, it's still not a clean architecture.

=> Every JSON message is now wrapped in a chunked stream
   (chunked and unchunked)
   => no special-cases
=> Keep ChainedReader, might be useful later on...
2017-05-13 15:33:46 +02:00
Christian Schwarz
b2de658270 util: fix package name of chunking 2017-05-13 15:25:09 +02:00
Christian Schwarz
61c263b91d chunking: rewrite to handle EOF events correctly
bonus: some tests asserting the chunking protocol is adhered to
2017-05-06 23:41:51 +02:00
Christian Schwarz
d9ecfc8eb4 Gofmt megacommit. 2017-04-26 20:29:54 +02:00
Christian Schwarz
4494afe47f Finish implementation of RPC. 2017-04-16 21:38:31 +02:00
Christian Schwarz
69f8e7cfc3 Implement chunking.
Move from rpc to separate util package.
2017-04-15 17:07:32 +02:00