GoWithTimeout does the same thing with Go() method except it takes an extra argument that is the timeout for waiting reply from the remote Kite. If timeout is given 0, the behavior is same as Go().
(method string, timeout time.Duration, args ...interface{})
| 739 | // extra argument that is the timeout for waiting reply from the remote Kite. |
| 740 | // If timeout is given 0, the behavior is same as Go(). |
| 741 | func (c *Client) GoWithTimeout(method string, timeout time.Duration, args ...interface{}) chan *response { |
| 742 | // We will return this channel to the caller. |
| 743 | // It can wait on this channel to get the response. |
| 744 | responseChan := make(chan *response, 1) |
| 745 | |
| 746 | c.sendMethod(method, args, timeout, responseChan) |
| 747 | |
| 748 | return responseChan |
| 749 | } |
| 750 | |
| 751 | // sendMethod wraps the arguments, adds a response callback, |
| 752 | // marshals the message and send it over the wire. |
no test coverage detected