Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(2631)

Side by Side Diff: src/pkg/net/rpc/jsonrpc/client.go

Issue 5345045: code review 5345045: renaming_3: gofix -r go1pkgrename src/pkg/[m-z]* (Closed)
Patch Set: diff -r 94794514aca0 https://go.googlecode.com/hg/ Created 13 years, 5 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/pkg/net/rpc/jsonrpc/all_test.go ('k') | src/pkg/net/rpc/jsonrpc/server.go » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2010 The Go Authors. All rights reserved. 1 // Copyright 2010 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style 2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file. 3 // license that can be found in the LICENSE file.
4 4
5 // Package jsonrpc implements a JSON-RPC ClientCodec and ServerCodec 5 // Package jsonrpc implements a JSON-RPC ClientCodec and ServerCodec
6 // for the rpc package. 6 // for the rpc package.
7 package jsonrpc 7 package jsonrpc
8 8
9 import ( 9 import (
10 "encoding/json"
10 "fmt" 11 "fmt"
11 "io" 12 "io"
12 "json"
13 "net" 13 "net"
14 » "rpc" 14 » "net/rpc"
15 "sync" 15 "sync"
16 ) 16 )
17 17
18 type clientCodec struct { 18 type clientCodec struct {
19 dec *json.Decoder // for reading JSON values 19 dec *json.Decoder // for reading JSON values
20 enc *json.Encoder // for writing JSON values 20 enc *json.Encoder // for writing JSON values
21 c io.Closer 21 c io.Closer
22 22
23 // temporary work space 23 // temporary work space
24 req clientRequest 24 req clientRequest
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 } 114 }
115 115
116 // Dial connects to a JSON-RPC server at the specified network address. 116 // Dial connects to a JSON-RPC server at the specified network address.
117 func Dial(network, address string) (*rpc.Client, error) { 117 func Dial(network, address string) (*rpc.Client, error) {
118 conn, err := net.Dial(network, address) 118 conn, err := net.Dial(network, address)
119 if err != nil { 119 if err != nil {
120 return nil, err 120 return nil, err
121 } 121 }
122 return NewClient(conn), err 122 return NewClient(conn), err
123 } 123 }
OLDNEW
« no previous file with comments | « src/pkg/net/rpc/jsonrpc/all_test.go ('k') | src/pkg/net/rpc/jsonrpc/server.go » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b