class WebSocketImpl extends WebSocketBase {
    private static final Logger log = LoggerFactory.getLogger(WebSocketImpl.class);
    private WebSocketChannel real;

    public WebSocketImpl(WebSocketChannel real) {
        this.real = real;
        this.init(URI.create(real.getUrl()));
    }

    @Override
    public boolean isValid() {
        return isClosed() == false && real.isOpen();
    }

    @Override
    public boolean isSecure() {
        return real.isSecure();
    }

    @Override
    public InetSocketAddress remoteAddress() {
        return real.getSourceAddress();
    }

    @Override
    public InetSocketAddress localAddress() {
        return real.getDestinationAddress();
    }

    @Override
    public long getIdleTimeout() {
        return real.getIdleTimeout();
    }

    @Override
    public void setIdleTimeout(long idleTimeout) {
        real.setIdleTimeout(idleTimeout);
    }


    @Override
    public void send(String text) {
        WebSockets.sendText(text, real, CallbackImpl.instance);
    }

    @Override
    public void send(ByteBuffer binary) {
        WebSockets.sendBinary(binary, real, CallbackImpl.instance);
    }

    @Override
    public void close() {<FILL_FUNCTION_BODY>}
}

        super.close();
        try {
            real.close();
        } catch (IOException e) {
            if (log.isDebugEnabled()) {
                log.debug("{}", e);
            }
        }
    
<methods>public non-sealed void <init>() ,public T attr(java.lang.String) ,public void attr(java.lang.String, T) ,public boolean attrHas(java.lang.String) ,public Map<java.lang.String,java.lang.Object> attrMap() ,public T attrOrDefault(java.lang.String, T) ,public void close() ,public java.lang.String id() ,public boolean isClosed() ,public java.lang.String param(java.lang.String) ,public void param(java.lang.String, java.lang.String) ,public Map<java.lang.String,java.lang.String> paramMap() ,public java.lang.String paramOrDefault(java.lang.String, java.lang.String) ,public java.lang.String path() ,public void pathNew(java.lang.String) ,public java.lang.String url() <variables>private final Map<java.lang.String,java.lang.Object> attrMap,private org.noear.solon.net.websocket.Handshake handshake,private java.lang.String id,private boolean isClosed,static final org.slf4j.Logger log,private java.lang.String pathNew