mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
parent
183edddb9d
commit
7e92eedced
4 changed files with 408 additions and 408 deletions
|
|
@ -75,7 +75,7 @@ func (client *Client) input() {
|
|||
if err == os.EOF {
|
||||
err = io.ErrUnexpectedEOF;
|
||||
}
|
||||
break
|
||||
break;
|
||||
}
|
||||
seq := response.Seq;
|
||||
client.mutex.Lock();
|
||||
|
|
@ -115,7 +115,7 @@ func NewClient(conn io.ReadWriteCloser) *Client {
|
|||
func DialHTTP(network, address string) (*Client, os.Error) {
|
||||
conn, err := net.Dial(network, "", address);
|
||||
if err != nil {
|
||||
return nil, err
|
||||
return nil, err;
|
||||
}
|
||||
io.WriteString(conn, "CONNECT " + rpcPath + " HTTP/1.0\n\n");
|
||||
|
||||
|
|
@ -136,7 +136,7 @@ func DialHTTP(network, address string) (*Client, os.Error) {
|
|||
func Dial(network, address string) (*Client, os.Error) {
|
||||
conn, err := net.Dial(network, "", address);
|
||||
if err != nil {
|
||||
return nil, err
|
||||
return nil, err;
|
||||
}
|
||||
return NewClient(conn), nil;
|
||||
}
|
||||
|
|
@ -170,7 +170,7 @@ func (client *Client) Go(serviceMethod string, args interface{}, reply interface
|
|||
// Call invokes the named function, waits for it to complete, and returns its error status.
|
||||
func (client *Client) Call(serviceMethod string, args interface{}, reply interface{}) os.Error {
|
||||
if client.shutdown != nil {
|
||||
return client.shutdown
|
||||
return client.shutdown;
|
||||
}
|
||||
call := <-client.Go(serviceMethod, args, reply, nil).Done;
|
||||
return call.Error;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue