@Override
    public void close() throws ChannelException {
        try {
            receiver.stop();
            out.close();
            in.close();
            super.close();
        }
        catch (IOException ex) {
            throw new ChannelException(ex);
        }
    }