SetLinger 设置Linger
(seconds int)
| 162 | |
| 163 | // SetLinger 设置Linger |
| 164 | func (this *BaseClientConn) SetLinger(seconds int) error { |
| 165 | tcpConn, ok := this.TCPConn() |
| 166 | if ok { |
| 167 | return tcpConn.SetLinger(seconds) |
| 168 | } |
| 169 | return nil |
| 170 | } |
| 171 | |
| 172 | func (this *BaseClientConn) SetIsPersistent(isPersistent bool) { |
| 173 | this.isPersistent = isPersistent |