@Override
    public Object getOption(int optID) throws SocketException {
        try {
            switch (optID) {
            case SocketOptions.SO_KEEPALIVE:
            case SocketOptions.TCP_NODELAY:
                return NativeUnixSocket.getSocketOptionInt(fd, optID) != 0 ? true
                        : false;
            case SocketOptions.SO_LINGER:
            case SocketOptions.SO_TIMEOUT:
            case SocketOptions.SO_RCVBUF:
            case SocketOptions.SO_SNDBUF:
                return NativeUnixSocket.getSocketOptionInt(fd, optID);
            }
        } catch (final AFUNIXSocketException e) {
            throw e;
        } catch (final Exception e) {
            throw new AFUNIXSocketException("Error while getting option", e);
        }
        throw new AFUNIXSocketException("Unsupported option: " + optID);
    }