public void setLinger(TcpSocket fan, Duration v) { try { if (v == null) socket.setSoLinger(false, 0); else socket.setSoLinger(true, (int) (v.sec())); } catch (IOException e) { throw IOErr.make(e); } }