// Sets read timeout
321354
func (c *DeadlineConn) setReadTimeout() {
	if c.readTimeout != 0 {
		c.SetReadDeadline(time.Now().UTC().Add(c.readTimeout))
	}
}
1290650
func (d *Death) SetTimeout(t time.Duration) *Death {
	d.timeout = t
	return d
}
465474
func (c *Client) SetReadDeadline(t time.Time) error {
	return c.p.SetReadDeadline(t)
}
607011
func (p *PodHealthCheck) SetTimeout(timeoutSeconds int) *PodHealthCheck {
	p.TimeoutSeconds = &timeoutSeconds
	return p
}
584518
func (c *Config) SetTimeout(t time.Duration) error {
	if c == nil {
		return fmt.Errorf("nil config")
	} else if c.httpClient == nil {
		return fmt.Errorf("nil HTTP client")
	} else if c.httpClient.Transport == nil {
		return fmt.Errorf("nil HTTP client transport")
	}

	// Apply a timeout.
	if t.Nanoseconds() >= 0 {
		transport, ok := c.httpClient.Transport.(*http.Transport)
		if !ok {
			return fmt.Errorf("unexpected HTTP transport: %T", c.httpClient.Transport)
		}

		transport.DialContext = (&net.Dialer{
			Timeout:   t,
			KeepAlive: 30 * time.Second,
		}).DialContext
	}

	return nil
}
459977
func (b *HttpRequest) SetTimeout(connectTimeout, readWriteTimeout time.Duration) *HttpRequest {
	b.setting.ConnectTimeout = connectTimeout
	b.setting.ReadWriteTimeout = readWriteTimeout
	return b
}
600399
func (b *UpdateService) Timeout(timeout string) *UpdateService {
	b.timeout = timeout
	return b
}
699361
func (conn *WebsocketConnection) SetReadDeadline(t time.Time) error {
	return conn.ws.SetReadDeadline(t)
}
435532
func (ctn *Connection) SetTimeout(deadline time.Time, socketTimeout time.Duration) error {
	ctn.deadline = deadline
	ctn.socketTimeout = socketTimeout

	return nil
}
711011
func (c *connection) SetIdleTimeout(timeout time.Duration) {
	c.conn.SetIdleTimeout(timeout)
}
278715
func (self *HttpClient) SetTimeout(t time.Duration) {
	self.client.Timeout = t
}
309417
func (c *connector) ReadTimeout(timeout time.Duration) (interface{}, error) {
	for {
		if !c.IsConnected() {
			return nil, ErrIllegalState
		}

		doRead, msg, err := c.doPreRead()
		if err != nil {
			return nil, err
		}

		if !doRead {
			return msg, nil
		}

		var complete bool
		for {
			if c.in.Readable() > 0 {
				complete, msg, err = c.opts.decoder.Decode(c.in)

				if !complete && err == nil {
					complete, msg, err = c.readFromConn(timeout)
				}
			} else {
				complete, msg, err = c.readFromConn(timeout)
			}

			if nil != err {
				c.in.Clear()
				return nil, err
			}

			if complete {
				break
			}
		}

		if c.in.Readable() == 0 {
			c.in.Clear()
		}

		returnRead, readMsg, err := c.doPostRead(msg)
		if err != nil {
			return nil, err
		}

		if returnRead {
			return readMsg, err
		}
	}
}
908924
func (c *throttledConn) SetReadDeadline(t time.Time) error {
	return c.originalConn.SetReadDeadline(t)
}
744507
func (s *HealthCheck) SetTimeout(v int64) *HealthCheck {
	s.Timeout = &v
	return s
}
215749
func ReadTimeout(d time.Duration) func(*Term) error {
	return func(t *Term) error {
		return t.setReadTimeout(d)
	}
}
373937
func (s *JobRun) SetTimeout(v int64) *JobRun {
	s.Timeout = &v
	return s
}
567601
func (f *Fibre) SetWriteTimeout(wait string) {
	f.wtimeout, _ = time.ParseDuration(wait)
}