- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for NewServerCodec (0.26 sec)
-
src/net/rpc/jsonrpc/server.go
// the response to find the original request ID. mutex sync.Mutex // protects seq, pending seq uint64 pending map[uint64]*json.RawMessage } // NewServerCodec returns a new [rpc.ServerCodec] using JSON-RPC on conn. func NewServerCodec(conn io.ReadWriteCloser) rpc.ServerCodec { return &serverCodec{ dec: json.NewDecoder(conn), enc: json.NewEncoder(conn), c: conn,
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Jan 10 03:29:50 UTC 2024 - 3.2K bytes - Viewed (0) -
src/net/rpc/jsonrpc/all_test.go
err := client.Call("Arith.Add", args, reply) if err == nil { t.Error("expected error") } } func TestServerErrorHasNullResult(t *testing.T) { var out strings.Builder sc := NewServerCodec(struct { io.Reader io.Writer io.Closer }{ Reader: strings.NewReader(`{"method": "Arith.Add", "id": "123", "params": []}`), Writer: &out, Closer: io.NopCloser(nil), })
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Sep 07 01:09:53 UTC 2022 - 7.8K bytes - Viewed (0)