/** * Get the socket option <code>SocketConnection.LINGER</code>. * * @return the linger option. If the socket connection is not open, this * valid is not valid. */ public synchronized int getLinger() { if (socketConnection != null) { try { linger = socketConnection .getSocketOption(SocketConnection.LINGER); } catch (IllegalArgumentException e) { System.err .println("Failed to get the socket option SocketConnection.LINGER " + e.getMessage()); } catch (IOException e) { System.err .println("Failed to get the socket option SocketConnection.LINGER " + e.getMessage()); } } return linger; }