SetDeadline sets the read and write deadlines associated with the connection. It is equivalent to calling both SetReadDeadline and SetWriteDeadline. A deadline is an absolute time after which I/O operations fail with a timeout (see type Error) instead of blocking. The deadline applies to all future
(t time.Time)
| 561 | // |
| 562 | // A zero value for t means I/O operations will not time out. |
| 563 | func (c *Conn) SetDeadline(t time.Time) error { |
| 564 | c.rdeadline.setDeadline(t) |
| 565 | c.wdeadline.setDeadline(t) |
| 566 | return nil |
| 567 | } |
| 568 | |
| 569 | // SetReadDeadline sets the deadline for future Read calls and any |
| 570 | // currently-blocked Read call. |