From 78745551c077bf54151202138c2629f288769561 Mon Sep 17 00:00:00 2001 From: Determinant Date: Tue, 15 Sep 2020 23:55:34 -0400 Subject: WIP: geth-tavum --- rpc/doc.go | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'rpc/doc.go') diff --git a/rpc/doc.go b/rpc/doc.go index e5840c3..e0a6324 100644 --- a/rpc/doc.go +++ b/rpc/doc.go @@ -29,8 +29,6 @@ Methods that satisfy the following criteria are made available for remote access - method must be exported - method returns 0, 1 (response or error) or 2 (response and error) values - - method argument(s) must be exported or builtin types - - method returned value(s) must be exported or builtin types An example method: @@ -73,14 +71,9 @@ An example server which uses the JSON codec: calculator := new(CalculatorService) server := NewServer() - server.RegisterName("calculator", calculator") - + server.RegisterName("calculator", calculator) l, _ := net.ListenUnix("unix", &net.UnixAddr{Net: "unix", Name: "/tmp/calculator.sock"}) - for { - c, _ := l.AcceptUnix() - codec := v2.NewJSONCodec(c) - go server.ServeCodec(codec, 0) - } + server.ServeListener(l) Subscriptions @@ -90,7 +83,6 @@ criteria: - method must be exported - first method argument type must be context.Context - - method argument(s) must be exported or builtin types - method must have return types (rpc.Subscription, error) An example method: -- cgit v1.2.3