Json-Rpc 2.0 protocol implementation.
Stratum protocol is based on JSON-RPC 2.0. (although it doesn't include "jsonrpc" information in every message). Each message has to end with a line end character (n).