public interface QuicChannel
extends io.netty.channel.Channel
Channel
.Modifier and Type | Method and Description |
---|---|
default io.netty.channel.ChannelFuture |
bind(java.net.SocketAddress localAddress) |
default io.netty.channel.ChannelFuture |
bind(java.net.SocketAddress localAddress,
io.netty.channel.ChannelPromise promise) |
default io.netty.channel.ChannelFuture |
close() |
default io.netty.channel.ChannelFuture |
close(boolean applicationClose,
int error,
io.netty.buffer.ByteBuf reason)
Close the
QuicChannel |
io.netty.channel.ChannelFuture |
close(boolean applicationClose,
int error,
io.netty.buffer.ByteBuf reason,
io.netty.channel.ChannelPromise promise)
Close the
QuicChannel |
default io.netty.channel.ChannelFuture |
close(io.netty.channel.ChannelPromise promise) |
default io.netty.util.concurrent.Future<QuicConnectionStats> |
collectStats()
Collects statistics about the connection and notifies the
Future once done. |
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. |
QuicChannelConfig |
config()
Returns the configuration of this channel.
|
default io.netty.channel.ChannelFuture |
connect(java.net.SocketAddress remoteAddress) |
default io.netty.channel.ChannelFuture |
connect(java.net.SocketAddress remoteAddress,
io.netty.channel.ChannelPromise promise) |
default io.netty.channel.ChannelFuture |
connect(java.net.SocketAddress remoteAddress,
java.net.SocketAddress localAddress) |
default io.netty.channel.ChannelFuture |
connect(java.net.SocketAddress remoteAddress,
java.net.SocketAddress localAddress,
io.netty.channel.ChannelPromise promise) |
default io.netty.util.concurrent.Future<QuicStreamChannel> |
createStream(QuicStreamType type,
io.netty.channel.ChannelHandler handler)
Creates a stream that is using this
QuicChannel and notifies the Future once done. |
io.netty.util.concurrent.Future<QuicStreamChannel> |
createStream(QuicStreamType type,
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. |
default io.netty.channel.ChannelFuture |
deregister() |
default io.netty.channel.ChannelFuture |
deregister(io.netty.channel.ChannelPromise promise) |
default io.netty.channel.ChannelFuture |
disconnect() |
default io.netty.channel.ChannelFuture |
disconnect(io.netty.channel.ChannelPromise promise) |
QuicChannel |
flush() |
boolean |
isTimedOut()
Returns
true if the connection was closed because of idle timeout. |
static QuicChannelBootstrap |
newBootstrap(io.netty.channel.Channel channel)
Creates a new
QuicChannelBootstrap that can be used to create and connect new QuicChannel s to
endpoints using the given Channel as transport layer. |
default io.netty.channel.ChannelFuture |
newFailedFuture(java.lang.Throwable cause) |
default io.netty.channel.ChannelProgressivePromise |
newProgressivePromise() |
default io.netty.channel.ChannelPromise |
newPromise() |
default QuicStreamChannelBootstrap |
newStreamBootstrap()
Returns a new
QuicStreamChannelBootstrap which makes it easy to bootstrap new QuicStreamChannel s
with custom options and attributes. |
default io.netty.channel.ChannelFuture |
newSucceededFuture() |
long |
peerAllowedStreams(QuicStreamType type)
Returns the number of streams that can be created before stream creation will fail
with
QuicError.STREAM_LIMIT error. |
QuicChannel |
read() |
javax.net.ssl.SSLEngine |
sslEngine()
Returns the used
SSLEngine or null if none is used (yet). |
default io.netty.channel.ChannelPromise |
voidPromise() |
default io.netty.channel.ChannelFuture |
write(java.lang.Object msg) |
default io.netty.channel.ChannelFuture |
write(java.lang.Object msg,
io.netty.channel.ChannelPromise promise) |
default io.netty.channel.ChannelFuture |
writeAndFlush(java.lang.Object msg) |
default io.netty.channel.ChannelFuture |
writeAndFlush(java.lang.Object msg,
io.netty.channel.ChannelPromise promise) |
default io.netty.channel.ChannelFuture bind(java.net.SocketAddress localAddress)
bind
in interface io.netty.channel.ChannelOutboundInvoker
default io.netty.channel.ChannelFuture connect(java.net.SocketAddress remoteAddress)
connect
in interface io.netty.channel.ChannelOutboundInvoker
default io.netty.channel.ChannelFuture connect(java.net.SocketAddress remoteAddress, java.net.SocketAddress localAddress)
connect
in interface io.netty.channel.ChannelOutboundInvoker
default io.netty.channel.ChannelFuture disconnect()
disconnect
in interface io.netty.channel.ChannelOutboundInvoker
default io.netty.channel.ChannelFuture close()
close
in interface io.netty.channel.ChannelOutboundInvoker
default io.netty.channel.ChannelFuture deregister()
deregister
in interface io.netty.channel.ChannelOutboundInvoker
default io.netty.channel.ChannelFuture bind(java.net.SocketAddress localAddress, io.netty.channel.ChannelPromise promise)
bind
in interface io.netty.channel.ChannelOutboundInvoker
default io.netty.channel.ChannelFuture connect(java.net.SocketAddress remoteAddress, io.netty.channel.ChannelPromise promise)
connect
in interface io.netty.channel.ChannelOutboundInvoker
default io.netty.channel.ChannelFuture connect(java.net.SocketAddress remoteAddress, java.net.SocketAddress localAddress, io.netty.channel.ChannelPromise promise)
connect
in interface io.netty.channel.ChannelOutboundInvoker
default io.netty.channel.ChannelFuture disconnect(io.netty.channel.ChannelPromise promise)
disconnect
in interface io.netty.channel.ChannelOutboundInvoker
default io.netty.channel.ChannelFuture close(io.netty.channel.ChannelPromise promise)
close
in interface io.netty.channel.ChannelOutboundInvoker
default io.netty.channel.ChannelFuture deregister(io.netty.channel.ChannelPromise promise)
deregister
in interface io.netty.channel.ChannelOutboundInvoker
default io.netty.channel.ChannelFuture write(java.lang.Object msg)
write
in interface io.netty.channel.ChannelOutboundInvoker
default io.netty.channel.ChannelFuture write(java.lang.Object msg, io.netty.channel.ChannelPromise promise)
write
in interface io.netty.channel.ChannelOutboundInvoker
default io.netty.channel.ChannelFuture writeAndFlush(java.lang.Object msg, io.netty.channel.ChannelPromise promise)
writeAndFlush
in interface io.netty.channel.ChannelOutboundInvoker
default io.netty.channel.ChannelFuture writeAndFlush(java.lang.Object msg)
writeAndFlush
in interface io.netty.channel.ChannelOutboundInvoker
default io.netty.channel.ChannelPromise newPromise()
newPromise
in interface io.netty.channel.ChannelOutboundInvoker
default io.netty.channel.ChannelProgressivePromise newProgressivePromise()
newProgressivePromise
in interface io.netty.channel.ChannelOutboundInvoker
default io.netty.channel.ChannelFuture newSucceededFuture()
newSucceededFuture
in interface io.netty.channel.ChannelOutboundInvoker
default io.netty.channel.ChannelFuture newFailedFuture(java.lang.Throwable cause)
newFailedFuture
in interface io.netty.channel.ChannelOutboundInvoker
default io.netty.channel.ChannelPromise voidPromise()
voidPromise
in interface io.netty.channel.ChannelOutboundInvoker
QuicChannel read()
read
in interface io.netty.channel.Channel
read
in interface io.netty.channel.ChannelOutboundInvoker
QuicChannel flush()
flush
in interface io.netty.channel.Channel
flush
in interface io.netty.channel.ChannelOutboundInvoker
QuicChannelConfig config()
config
in interface io.netty.channel.Channel
javax.net.ssl.SSLEngine sslEngine()
SSLEngine
or null
if none is used (yet).long peerAllowedStreams(QuicStreamType type)
QuicError.STREAM_LIMIT
error.type
- the stream type.boolean isTimedOut()
true
if the connection was closed because of idle timeout.true
if the connection was closed because of idle timeout, false
.default io.netty.util.concurrent.Future<QuicStreamChannel> createStream(QuicStreamType type, io.netty.channel.ChannelHandler handler)
QuicChannel
and notifies the Future
once done.
The ChannelHandler
(if not null
) is added to the ChannelPipeline
of the
QuicStreamChannel
automatically.type
- the QuicStreamType
of the QuicStreamChannel
.handler
- the ChannelHandler
that will be added to the QuicStreamChannel
s
ChannelPipeline
during the stream creation.Future
that will be notified once the operation completes.io.netty.util.concurrent.Future<QuicStreamChannel> createStream(QuicStreamType type, io.netty.channel.ChannelHandler handler, io.netty.util.concurrent.Promise<QuicStreamChannel> promise)
QuicChannel
and notifies the Promise
once done.
The ChannelHandler
(if not null
) is added to the ChannelPipeline
of the
QuicStreamChannel
automatically.type
- the QuicStreamType
of the QuicStreamChannel
.handler
- the ChannelHandler
that will be added to the QuicStreamChannel
s
ChannelPipeline
during the stream creation.promise
- the ChannelPromise
that will be notified once the operation completes.Future
that will be notified once the operation completes.default QuicStreamChannelBootstrap newStreamBootstrap()
QuicStreamChannelBootstrap
which makes it easy to bootstrap new QuicStreamChannel
s
with custom options and attributes. For simpler use-cases you may want to consider using
createStream(QuicStreamType, ChannelHandler)
or
createStream(QuicStreamType, ChannelHandler, Promise)
directly.QuicStreamChannelBootstrap
that can be used to bootstrap a QuicStreamChannel
.default io.netty.channel.ChannelFuture close(boolean applicationClose, int error, io.netty.buffer.ByteBuf reason)
QuicChannel
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
.io.netty.channel.ChannelFuture close(boolean applicationClose, int error, io.netty.buffer.ByteBuf reason, io.netty.channel.ChannelPromise promise)
QuicChannel
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.default io.netty.util.concurrent.Future<QuicConnectionStats> collectStats()
Future
once done.Future
that is notified once the stats were collected.io.netty.util.concurrent.Future<QuicConnectionStats> collectStats(io.netty.util.concurrent.Promise<QuicConnectionStats> promise)
Promise
once done.promise
- the ChannelPromise
that is notified once the stats were collected.Future
that is notified once the stats were collected.static QuicChannelBootstrap newBootstrap(io.netty.channel.Channel channel)
QuicChannelBootstrap
that can be used to create and connect new QuicChannel
s to
endpoints using the given Channel
as transport layer.channel
- the Channel
that is used as transport layer.QuicChannelBootstrap
that can be used to bootstrap a client side QuicChannel
.Copyright © 2020-2023 The Netty Project. All Rights Reserved.