Interface QuicChannel

  • All Superinterfaces:
    io.netty.util.AttributeMap, io.netty.channel.Channel, io.netty.channel.ChannelOutboundInvoker, Comparable<io.netty.channel.Channel>

    public interface QuicChannel
    extends io.netty.channel.Channel
    A QUIC Channel.
    • Method Detail

      • bind

        default io.netty.channel.ChannelFuture bind​(SocketAddress localAddress)
        Specified by:
        bind in interface io.netty.channel.Channel
        Specified by:
        bind in interface io.netty.channel.ChannelOutboundInvoker
      • connect

        default io.netty.channel.ChannelFuture connect​(SocketAddress remoteAddress)
        Specified by:
        connect in interface io.netty.channel.Channel
        Specified by:
        connect in interface io.netty.channel.ChannelOutboundInvoker
      • connect

        default io.netty.channel.ChannelFuture connect​(SocketAddress remoteAddress,
                                                       SocketAddress localAddress)
        Specified by:
        connect in interface io.netty.channel.Channel
        Specified by:
        connect in interface io.netty.channel.ChannelOutboundInvoker
      • disconnect

        default io.netty.channel.ChannelFuture disconnect()
        Specified by:
        disconnect in interface io.netty.channel.Channel
        Specified by:
        disconnect in interface io.netty.channel.ChannelOutboundInvoker
      • close

        default io.netty.channel.ChannelFuture close()
        Specified by:
        close in interface io.netty.channel.Channel
        Specified by:
        close in interface io.netty.channel.ChannelOutboundInvoker
      • deregister

        default io.netty.channel.ChannelFuture deregister()
        Specified by:
        deregister in interface io.netty.channel.Channel
        Specified by:
        deregister in interface io.netty.channel.ChannelOutboundInvoker
      • bind

        default io.netty.channel.ChannelFuture bind​(SocketAddress localAddress,
                                                    io.netty.channel.ChannelPromise promise)
        Specified by:
        bind in interface io.netty.channel.Channel
        Specified by:
        bind in interface io.netty.channel.ChannelOutboundInvoker
      • connect

        default io.netty.channel.ChannelFuture connect​(SocketAddress remoteAddress,
                                                       io.netty.channel.ChannelPromise promise)
        Specified by:
        connect in interface io.netty.channel.Channel
        Specified by:
        connect in interface io.netty.channel.ChannelOutboundInvoker
      • connect

        default io.netty.channel.ChannelFuture connect​(SocketAddress remoteAddress,
                                                       SocketAddress localAddress,
                                                       io.netty.channel.ChannelPromise promise)
        Specified by:
        connect in interface io.netty.channel.Channel
        Specified by:
        connect in interface io.netty.channel.ChannelOutboundInvoker
      • disconnect

        default io.netty.channel.ChannelFuture disconnect​(io.netty.channel.ChannelPromise promise)
        Specified by:
        disconnect in interface io.netty.channel.Channel
        Specified by:
        disconnect in interface io.netty.channel.ChannelOutboundInvoker
      • close

        default io.netty.channel.ChannelFuture close​(io.netty.channel.ChannelPromise promise)
        Specified by:
        close in interface io.netty.channel.Channel
        Specified by:
        close in interface io.netty.channel.ChannelOutboundInvoker
      • deregister

        default io.netty.channel.ChannelFuture deregister​(io.netty.channel.ChannelPromise promise)
        Specified by:
        deregister in interface io.netty.channel.Channel
        Specified by:
        deregister in interface io.netty.channel.ChannelOutboundInvoker
      • write

        default io.netty.channel.ChannelFuture write​(Object msg)
        Specified by:
        write in interface io.netty.channel.Channel
        Specified by:
        write in interface io.netty.channel.ChannelOutboundInvoker
      • write

        default io.netty.channel.ChannelFuture write​(Object msg,
                                                     io.netty.channel.ChannelPromise promise)
        Specified by:
        write in interface io.netty.channel.Channel
        Specified by:
        write in interface io.netty.channel.ChannelOutboundInvoker
      • writeAndFlush

        default io.netty.channel.ChannelFuture writeAndFlush​(Object msg,
                                                             io.netty.channel.ChannelPromise promise)
        Specified by:
        writeAndFlush in interface io.netty.channel.Channel
        Specified by:
        writeAndFlush in interface io.netty.channel.ChannelOutboundInvoker
      • writeAndFlush

        default io.netty.channel.ChannelFuture writeAndFlush​(Object msg)
        Specified by:
        writeAndFlush in interface io.netty.channel.Channel
        Specified by:
        writeAndFlush in interface io.netty.channel.ChannelOutboundInvoker
      • newPromise

        default io.netty.channel.ChannelPromise newPromise()
        Specified by:
        newPromise in interface io.netty.channel.Channel
        Specified by:
        newPromise in interface io.netty.channel.ChannelOutboundInvoker
      • newProgressivePromise

        default io.netty.channel.ChannelProgressivePromise newProgressivePromise()
        Specified by:
        newProgressivePromise in interface io.netty.channel.Channel
        Specified by:
        newProgressivePromise in interface io.netty.channel.ChannelOutboundInvoker
      • newSucceededFuture

        default io.netty.channel.ChannelFuture newSucceededFuture()
        Specified by:
        newSucceededFuture in interface io.netty.channel.Channel
        Specified by:
        newSucceededFuture in interface io.netty.channel.ChannelOutboundInvoker
      • newFailedFuture

        default io.netty.channel.ChannelFuture newFailedFuture​(Throwable cause)
        Specified by:
        newFailedFuture in interface io.netty.channel.Channel
        Specified by:
        newFailedFuture in interface io.netty.channel.ChannelOutboundInvoker
      • voidPromise

        default io.netty.channel.ChannelPromise voidPromise()
        Specified by:
        voidPromise in interface io.netty.channel.Channel
        Specified by:
        voidPromise in interface io.netty.channel.ChannelOutboundInvoker
      • read

        QuicChannel read()
        Specified by:
        read in interface io.netty.channel.Channel
        Specified by:
        read in interface io.netty.channel.ChannelOutboundInvoker
      • flush

        QuicChannel flush()
        Specified by:
        flush in interface io.netty.channel.Channel
        Specified by:
        flush in interface io.netty.channel.ChannelOutboundInvoker
      • config

        QuicChannelConfig config()
        Returns the configuration of this channel.
        Specified by:
        config in interface io.netty.channel.Channel
      • sslEngine

        @Nullable
        @Nullable SSLEngine sslEngine()
        Returns the used SSLEngine or null if none is used (yet).
        Returns:
        the engine.
      • peerAllowedStreams

        long peerAllowedStreams​(QuicStreamType type)
        Returns the number of streams that can be created before stream creation will fail with QuicTransportError.STREAM_LIMIT_ERROR error.
        Parameters:
        type - the stream type.
        Returns:
        the number of streams left.
      • isTimedOut

        boolean isTimedOut()
        Returns true if the connection was closed because of idle timeout.
        Returns:
        true if the connection was closed because of idle timeout, false.
      • localAddress

        @Nullable
        @Nullable QuicConnectionAddress localAddress()
        Returns the local QuicConnectionAddress. This address might change over the life-time of the channel.
        Specified by:
        localAddress in interface io.netty.channel.Channel
        Returns:
        local the local QuicConnectionAddress or null if none is assigned yet, or assigned anymore.
      • remoteAddress

        @Nullable
        @Nullable QuicConnectionAddress remoteAddress()
        Returns the remote QuicConnectionAddress. This address might change over the life-time of the channel.
        Specified by:
        remoteAddress in interface io.netty.channel.Channel
        Returns:
        remote the remote QuicConnectionAddress or null if none is assigned yet, or assigned anymore.
      • localSocketAddress

        @Nullable
        @Nullable SocketAddress localSocketAddress()
        Returns the local SocketAddress of the underlying transport that received the data. This address might change over the life-time of the channel.
        Returns:
        local the local SocketAddress of the underlying transport or null if none is assigned yet, or assigned anymore.
      • remoteSocketAddress

        @Nullable
        @Nullable SocketAddress remoteSocketAddress()
        Returns the remote SocketAddress of the underlying transport to which the data is sent. This address might change over the life-time of the channel.
        Returns:
        local the remote SocketAddress of the underlying transport or null if none is assigned yet, or assigned anymore.
      • createStream

        default io.netty.util.concurrent.Future<QuicStreamChannel> createStream​(QuicStreamType type,
                                                                                @Nullable
                                                                                @Nullable io.netty.channel.ChannelHandler handler)
        Creates a stream that is using this QuicChannel and notifies the Future once done. The ChannelHandler (if not null) is added to the ChannelPipeline of the QuicStreamChannel automatically.
        Parameters:
        type - the QuicStreamType of the QuicStreamChannel.
        handler - the ChannelHandler that will be added to the QuicStreamChannels ChannelPipeline during the stream creation.
        Returns:
        the Future that will be notified once the operation completes.
      • createStream

        io.netty.util.concurrent.Future<QuicStreamChannel> createStream​(QuicStreamType type,
                                                                        @Nullable
                                                                        @Nullable io.netty.channel.ChannelHandler handler,
                                                                        io.netty.util.concurrent.Promise<QuicStreamChannel> promise)
        Creates a stream that is using this QuicChannel and notifies the Promise once done. The ChannelHandler (if not null) is added to the ChannelPipeline of the QuicStreamChannel automatically.
        Parameters:
        type - the QuicStreamType of the QuicStreamChannel.
        handler - the ChannelHandler that will be added to the QuicStreamChannels ChannelPipeline during the stream creation.
        promise - the ChannelPromise that will be notified once the operation completes.
        Returns:
        the Future that will be notified once the operation completes.
      • close

        default io.netty.channel.ChannelFuture close​(boolean applicationClose,
                                                     int error,
                                                     io.netty.buffer.ByteBuf reason)
        Close the QuicChannel
        Parameters:
        applicationClose - true if an application close should be used, false if a normal close should be used.
        error - the application error number, or 0 if no special error should be signaled.
        reason - the reason for the closure (which may be an empty ByteBuf.
        Returns:
        the future that is notified.
      • close

        io.netty.channel.ChannelFuture close​(boolean applicationClose,
                                             int error,
                                             io.netty.buffer.ByteBuf reason,
                                             io.netty.channel.ChannelPromise promise)
        Close the QuicChannel
        Parameters:
        applicationClose - true if an application close should be used, false if a normal close should be used.
        error - the application error number, or 0 if no special error should be signaled.
        reason - the reason for the closure (which may be an empty ByteBuf.
        promise - the ChannelPromise that will be notified.
        Returns:
        the future that is notified.
      • collectStats

        default io.netty.util.concurrent.Future<QuicConnectionStats> collectStats()
        Collects statistics about the connection and notifies the Future once done.
        Returns:
        the Future that is notified once the stats were collected.
      • collectStats

        io.netty.util.concurrent.Future<QuicConnectionStats> collectStats​(io.netty.util.concurrent.Promise<QuicConnectionStats> promise)
        Collects statistics about the connection and notifies the Promise once done.
        Parameters:
        promise - the ChannelPromise that is notified once the stats were collected.
        Returns:
        the Future that is notified once the stats were collected.
      • collectPathStats

        default io.netty.util.concurrent.Future<QuicConnectionPathStats> collectPathStats​(int pathIdx)
        Collects statistics about the path of the connection and notifies the Future once done.
        Returns:
        the Future that is notified once the stats were collected.
      • collectPathStats

        io.netty.util.concurrent.Future<QuicConnectionPathStats> collectPathStats​(int pathIdx,
                                                                                  io.netty.util.concurrent.Promise<QuicConnectionPathStats> promise)
        Collects statistics about the path of the connection and notifies the Promise once done.
        Parameters:
        promise - the ChannelPromise that is notified once the stats were collected.
        Returns:
        the Future that is notified once the stats were collected.