implement json-rpc
full socket stack