public class NioSctpChannel extends io.netty.channel.nio.AbstractNioMessageChannel implements SctpChannel
SctpChannel
implementation which use non-blocking mode and allows to read /
write SctpMessage
s to the underlying SctpChannel
.
Be aware that not all operations systems support SCTP. Please refer to the documentation of your operation system,
to understand what you need to do to use it. Also this feature is only supported on Java 7+.io.netty.channel.nio.AbstractNioChannel.AbstractNioUnsafe, io.netty.channel.nio.AbstractNioChannel.NioUnsafe
Constructor and Description |
---|
NioSctpChannel()
Create a new instance
|
NioSctpChannel(io.netty.channel.Channel parent,
SctpChannel sctpChannel)
Create a new instance
|
NioSctpChannel(SctpChannel sctpChannel)
Create a new instance using
SctpChannel |
Modifier and Type | Method and Description |
---|---|
Set<InetSocketAddress> |
allLocalAddresses()
Return all local addresses of the SCTP channel.
|
Set<InetSocketAddress> |
allRemoteAddresses()
Return all remote addresses of the SCTP server channel.
|
Association |
association()
Returns the underlying SCTP association.
|
io.netty.channel.ChannelFuture |
bindAddress(InetAddress localAddress)
Bind a address to the already bound channel to enable multi-homing.
|
io.netty.channel.ChannelFuture |
bindAddress(InetAddress localAddress,
io.netty.channel.ChannelPromise promise)
Bind a address to the already bound channel to enable multi-homing.
|
SctpChannelConfig |
config()
Returns the
SctpChannelConfig configuration of the channel. |
protected void |
doBind(SocketAddress localAddress) |
protected void |
doClose() |
protected boolean |
doConnect(SocketAddress remoteAddress,
SocketAddress localAddress) |
protected void |
doDisconnect() |
protected void |
doFinishConnect() |
protected int |
doReadMessages(List<Object> buf) |
protected boolean |
doWriteMessage(Object msg,
io.netty.channel.ChannelOutboundBuffer in) |
protected Object |
filterOutboundMessage(Object msg) |
boolean |
isActive() |
protected SctpChannel |
javaChannel() |
InetSocketAddress |
localAddress()
Return the (primary) local address of the SCTP channel.
|
protected SocketAddress |
localAddress0() |
io.netty.channel.ChannelMetadata |
metadata() |
SctpServerChannel |
parent() |
InetSocketAddress |
remoteAddress()
Return the (primary) remote address of the SCTP channel.
|
protected SocketAddress |
remoteAddress0() |
io.netty.channel.ChannelFuture |
unbindAddress(InetAddress localAddress)
Unbind the address from channel's multi-homing address list.
|
io.netty.channel.ChannelFuture |
unbindAddress(InetAddress localAddress,
io.netty.channel.ChannelPromise promise)
Unbind the address from channel's multi-homing address list.
|
closeOnReadError, continueOnWriteError, doBeginRead, doWrite, newUnsafe
clearReadPending, doDeregister, doRegister, eventLoop, isCompatible, isOpen, isReadPending, newDirectBuffer, newDirectBuffer, selectionKey, setReadPending, unsafe
alloc, bind, bind, bytesBeforeUnwritable, bytesBeforeWritable, close, close, closeFuture, compareTo, connect, connect, connect, connect, deregister, deregister, disconnect, disconnect, doShutdownOutput, equals, flush, hashCode, id, invalidateLocalAddress, invalidateRemoteAddress, isRegistered, isWritable, newChannelPipeline, newFailedFuture, newId, newProgressivePromise, newPromise, newSucceededFuture, pipeline, read, toString, validateFileRegion, voidPromise, write, write, writeAndFlush, writeAndFlush
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
alloc, bytesBeforeUnwritable, bytesBeforeWritable, closeFuture, eventLoop, flush, id, isOpen, isRegistered, isWritable, pipeline, read, unsafe
bind, bind, close, close, connect, connect, connect, connect, deregister, deregister, disconnect, disconnect, newFailedFuture, newProgressivePromise, newPromise, newSucceededFuture, voidPromise, write, write, writeAndFlush, writeAndFlush
compareTo
public NioSctpChannel()
public NioSctpChannel(SctpChannel sctpChannel)
SctpChannel
public NioSctpChannel(io.netty.channel.Channel parent, SctpChannel sctpChannel)
parent
- the Channel
which is the parent of this NioSctpChannel
or null
.sctpChannel
- the underlying SctpChannel
public InetSocketAddress localAddress()
SctpChannel
localAddress
in interface io.netty.channel.Channel
localAddress
in interface SctpChannel
localAddress
in class io.netty.channel.AbstractChannel
public InetSocketAddress remoteAddress()
SctpChannel
remoteAddress
in interface io.netty.channel.Channel
remoteAddress
in interface SctpChannel
remoteAddress
in class io.netty.channel.AbstractChannel
public SctpServerChannel parent()
parent
in interface io.netty.channel.Channel
parent
in interface SctpChannel
parent
in class io.netty.channel.AbstractChannel
public io.netty.channel.ChannelMetadata metadata()
metadata
in interface io.netty.channel.Channel
public Association association()
SctpChannel
association
in interface SctpChannel
public Set<InetSocketAddress> allLocalAddresses()
SctpChannel
allLocalAddresses
in interface SctpChannel
public SctpChannelConfig config()
SctpChannel
SctpChannelConfig
configuration of the channel.config
in interface io.netty.channel.Channel
config
in interface SctpChannel
public Set<InetSocketAddress> allRemoteAddresses()
SctpChannel
allRemoteAddresses
in interface SctpChannel
protected SctpChannel javaChannel()
javaChannel
in class io.netty.channel.nio.AbstractNioChannel
public boolean isActive()
isActive
in interface io.netty.channel.Channel
protected SocketAddress localAddress0()
localAddress0
in class io.netty.channel.AbstractChannel
protected SocketAddress remoteAddress0()
remoteAddress0
in class io.netty.channel.AbstractChannel
protected void doBind(SocketAddress localAddress) throws Exception
doBind
in class io.netty.channel.AbstractChannel
Exception
protected boolean doConnect(SocketAddress remoteAddress, SocketAddress localAddress) throws Exception
doConnect
in class io.netty.channel.nio.AbstractNioChannel
Exception
protected void doFinishConnect() throws Exception
doFinishConnect
in class io.netty.channel.nio.AbstractNioChannel
Exception
protected void doDisconnect() throws Exception
doDisconnect
in class io.netty.channel.AbstractChannel
Exception
protected void doClose() throws Exception
doClose
in class io.netty.channel.nio.AbstractNioChannel
Exception
protected int doReadMessages(List<Object> buf) throws Exception
doReadMessages
in class io.netty.channel.nio.AbstractNioMessageChannel
Exception
protected boolean doWriteMessage(Object msg, io.netty.channel.ChannelOutboundBuffer in) throws Exception
doWriteMessage
in class io.netty.channel.nio.AbstractNioMessageChannel
Exception
protected final Object filterOutboundMessage(Object msg) throws Exception
filterOutboundMessage
in class io.netty.channel.AbstractChannel
Exception
public io.netty.channel.ChannelFuture bindAddress(InetAddress localAddress)
SctpChannel
bindAddress
in interface SctpChannel
public io.netty.channel.ChannelFuture bindAddress(InetAddress localAddress, io.netty.channel.ChannelPromise promise)
SctpChannel
ChannelPromise
and return a ChannelFuture
bindAddress
in interface SctpChannel
public io.netty.channel.ChannelFuture unbindAddress(InetAddress localAddress)
SctpChannel
unbindAddress
in interface SctpChannel
public io.netty.channel.ChannelFuture unbindAddress(InetAddress localAddress, io.netty.channel.ChannelPromise promise)
SctpChannel
ChannelPromise
and return a ChannelFuture
unbindAddress
in interface SctpChannel
Copyright © 2008–2019 The Netty Project. All rights reserved.