(b []byte)
| 66 | } |
| 67 | |
| 68 | func (mc *mysqlConn) readWithTimeout(b []byte) (int, error) { |
| 69 | to := mc.cfg.ReadTimeout |
| 70 | if to > 0 { |
| 71 | if err := mc.netConn.SetReadDeadline(time.Now().Add(to)); err != nil { |
| 72 | return 0, err |
| 73 | } |
| 74 | } |
| 75 | return mc.netConn.Read(b) |
| 76 | } |
| 77 | |
| 78 | func (mc *mysqlConn) writeWithTimeout(b []byte) (int, error) { |
| 79 | to := mc.cfg.WriteTimeout |
nothing calls this directly
no test coverage detected