ing
This commit is contained in:
		
							parent
							
								
									a8f6ae169e
								
							
						
					
					
						commit
						8712bafeb6
					
				| @ -25,8 +25,8 @@ type Client interface { | ||||
| 	Close() | ||||
| 
 | ||||
| 	Notify(method string, args interface{}) error | ||||
| 	Call(method string, args interface{}, result interface{}) error | ||||
| 	CallTimeout(method string, args interface{}, result interface{}, timeout time.Duration) error | ||||
| 	Call(method string, args interface{}) (result interface{}, err error) | ||||
| 	CallTimeout(method string, args interface{}, timeout time.Duration) (result interface{}, err error) | ||||
| } | ||||
| 
 | ||||
| type client struct { | ||||
| @ -78,11 +78,11 @@ func (c *client) Notify(method string, args interface{}) error { | ||||
| 	return err | ||||
| } | ||||
| 
 | ||||
| func (c *client) Call(method string, args interface{}, result interface{}) error { | ||||
| 	return c.CallTimeout(method, args, result, c.ch.GetRequestTimeout()) | ||||
| func (c *client) Call(method string, args interface{}) (result interface{}, err error) { | ||||
| 	return c.CallTimeout(method, args, c.ch.GetRequestTimeout()) | ||||
| } | ||||
| 
 | ||||
| func (c *client) CallTimeout(method string, args interface{}, result interface{}, timeout time.Duration) (err error) { | ||||
| func (c *client) CallTimeout(method string, args interface{}, timeout time.Duration) (result interface{}, err error) { | ||||
| 	var cs *CallState | ||||
| 	if cs, err = c.send(method, args, result, true, true); nil != err { | ||||
| 		return | ||||
| @ -101,7 +101,7 @@ func (c *client) CallTimeout(method string, args interface{}, result interface{} | ||||
| 
 | ||||
| 	releaseTimer(t) | ||||
| 
 | ||||
| 	return nil | ||||
| 	return | ||||
| } | ||||
| 
 | ||||
| func (c *client) send(method string, args interface{}, result interface{}, hasResponse bool, usePool bool) (cs *CallState, err error) { | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user