类io.netty.channel.sctp.SctpServerChannel源码实例Demo

下面列出了怎么用io.netty.channel.sctp.SctpServerChannel的API类实例代码及写法,或者点击链接到github查看源代码。

源代码1 项目: netty-4.1.22   文件: OioSctpChannel.java
@Override
public SctpServerChannel parent() {
    return (SctpServerChannel) super.parent();
}
 
源代码2 项目: netty-4.1.22   文件: NioSctpChannel.java
@Override
public SctpServerChannel parent() {
    return (SctpServerChannel) super.parent();
}
 
源代码3 项目: netty-4.1.22   文件: OioSctpLimitStreamsTest.java
@Override
protected Class<? extends SctpServerChannel> serverClass() {
    return OioSctpServerChannel.class;
}
 
源代码4 项目: netty-4.1.22   文件: NioSctpLimitStreamsTest.java
@Override
protected Class<? extends SctpServerChannel> serverClass() {
    return NioSctpServerChannel.class;
}
 
源代码5 项目: netty4.0.27Learn   文件: OioSctpChannel.java
@Override
public SctpServerChannel parent() {
    return (SctpServerChannel) super.parent();
}
 
源代码6 项目: netty4.0.27Learn   文件: NioSctpChannel.java
@Override
public SctpServerChannel parent() {
    return (SctpServerChannel) super.parent();
}
 
源代码7 项目: sctp   文件: NettyServerImpl.java
private void initSocket() throws Exception {
    ServerBootstrap b = new ServerBootstrap();
    b.group(this.management.getBossGroup(), this.management.getWorkerGroup());
    if (this.ipChannelType == IpChannelType.SCTP) {
        b.channel(NioSctpServerChannel.class);
        b.option(ChannelOption.SO_BACKLOG, 100);
        b.childHandler(new NettySctpServerChannelInitializer(this, this.management));
        this.applySctpOptions(b);
    } else {
        b.channel(NioServerSocketChannel.class);
        b.option(ChannelOption.SO_BACKLOG, 100);
        b.childHandler(new NettyTcpServerChannelInitializer(this, this.management));
    }
    b.handler(new LoggingHandler(LogLevel.INFO));

    InetSocketAddress localAddress = new InetSocketAddress(this.hostAddress, this.hostport);

    // Bind the server to primary address.
    ChannelFuture channelFuture = b.bind(localAddress).sync();

    // Get the underlying sctp channel
    if (this.ipChannelType == IpChannelType.SCTP) {
        this.serverChannelSctp = (SctpServerChannel) channelFuture.channel();

        // Bind the secondary address.
        // Please note that, bindAddress in the client channel should be done before connecting if you have not
        // enable Dynamic Address Configuration. See net.sctp.addip_enable kernel param
        if (this.extraHostAddresses != null) {
            for (int count = 0; count < this.extraHostAddresses.length; count++) {
                String localSecondaryAddress = this.extraHostAddresses[count];
                InetAddress localSecondaryInetAddress = InetAddress.getByName(localSecondaryAddress);

                channelFuture = this.serverChannelSctp.bindAddress(localSecondaryInetAddress).sync();
            }
        }

        if (logger.isInfoEnabled()) {
            logger.info(String.format("SctpServerChannel bound to=%s ", this.serverChannelSctp.allLocalAddresses()));
        }
    } else {
        this.serverChannelTcp = (NioServerSocketChannel) channelFuture.channel();

        if (logger.isInfoEnabled()) {
            logger.info(String.format("ServerSocketChannel bound to=%s ", this.serverChannelTcp.localAddress()));
        }
    }
}
 
 类所在包
 类方法
 同包方法