当前位置: 首页>>代码示例>>Java>>正文


Java SctpStandardSocketOptions类代码示例

本文整理汇总了Java中com.sun.nio.sctp.SctpStandardSocketOptions的典型用法代码示例。如果您正苦于以下问题:Java SctpStandardSocketOptions类的具体用法?Java SctpStandardSocketOptions怎么用?Java SctpStandardSocketOptions使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


SctpStandardSocketOptions类属于com.sun.nio.sctp包,在下文中一共展示了SctpStandardSocketOptions类的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: setOption

import com.sun.nio.sctp.SctpStandardSocketOptions; //导入依赖的package包/类
@Override
public <T> boolean setOption(ChannelOption<T> option, T value) {
    validate(option, value);

    if (option == SO_RCVBUF) {
        setReceiveBufferSize((Integer) value);
    } else if (option == SO_SNDBUF) {
        setSendBufferSize((Integer) value);
    } else if (option == SCTP_NODELAY) {
        setSctpNoDelay((Boolean) value);
    } else if (option == SCTP_INIT_MAXSTREAMS) {
        setInitMaxStreams((SctpStandardSocketOptions.InitMaxStreams) value);
    } else {
        return super.setOption(option, value);
    }

    return true;
}
 
开发者ID:wuyinxian124,项目名称:netty4.0.27Learn,代码行数:19,代码来源:DefaultSctpChannelConfig.java

示例2: isSctpNoDelay

import com.sun.nio.sctp.SctpStandardSocketOptions; //导入依赖的package包/类
@Override
public boolean isSctpNoDelay() {
    try {
        return javaChannel.getOption(SctpStandardSocketOptions.SCTP_NODELAY);
    } catch (IOException e) {
        throw new ChannelException(e);
    }
}
 
开发者ID:wuyinxian124,项目名称:netty4.0.27Learn,代码行数:9,代码来源:DefaultSctpChannelConfig.java

示例3: setSctpNoDelay

import com.sun.nio.sctp.SctpStandardSocketOptions; //导入依赖的package包/类
@Override
public SctpChannelConfig setSctpNoDelay(boolean sctpNoDelay) {
    try {
        javaChannel.setOption(SctpStandardSocketOptions.SCTP_NODELAY, sctpNoDelay);
    } catch (IOException e) {
        throw new ChannelException(e);
    }
    return this;
}
 
开发者ID:wuyinxian124,项目名称:netty4.0.27Learn,代码行数:10,代码来源:DefaultSctpChannelConfig.java

示例4: getSendBufferSize

import com.sun.nio.sctp.SctpStandardSocketOptions; //导入依赖的package包/类
@Override
public int getSendBufferSize() {
    try {
        return javaChannel.getOption(SctpStandardSocketOptions.SO_SNDBUF);
    } catch (IOException e) {
        throw new ChannelException(e);
    }
}
 
开发者ID:wuyinxian124,项目名称:netty4.0.27Learn,代码行数:9,代码来源:DefaultSctpChannelConfig.java

示例5: setSendBufferSize

import com.sun.nio.sctp.SctpStandardSocketOptions; //导入依赖的package包/类
@Override
public SctpChannelConfig setSendBufferSize(int sendBufferSize) {
    try {
        javaChannel.setOption(SctpStandardSocketOptions.SO_SNDBUF, sendBufferSize);
    } catch (IOException e) {
        throw new ChannelException(e);
    }
    return this;
}
 
开发者ID:wuyinxian124,项目名称:netty4.0.27Learn,代码行数:10,代码来源:DefaultSctpChannelConfig.java

示例6: getReceiveBufferSize

import com.sun.nio.sctp.SctpStandardSocketOptions; //导入依赖的package包/类
@Override
public int getReceiveBufferSize() {
    try {
        return javaChannel.getOption(SctpStandardSocketOptions.SO_RCVBUF);
    } catch (IOException e) {
        throw new ChannelException(e);
    }
}
 
开发者ID:wuyinxian124,项目名称:netty4.0.27Learn,代码行数:9,代码来源:DefaultSctpChannelConfig.java

示例7: setReceiveBufferSize

import com.sun.nio.sctp.SctpStandardSocketOptions; //导入依赖的package包/类
@Override
public SctpChannelConfig setReceiveBufferSize(int receiveBufferSize) {
    try {
        javaChannel.setOption(SctpStandardSocketOptions.SO_RCVBUF, receiveBufferSize);
    } catch (IOException e) {
        throw new ChannelException(e);
    }
    return this;
}
 
开发者ID:wuyinxian124,项目名称:netty4.0.27Learn,代码行数:10,代码来源:DefaultSctpChannelConfig.java

示例8: getInitMaxStreams

import com.sun.nio.sctp.SctpStandardSocketOptions; //导入依赖的package包/类
@Override
public SctpStandardSocketOptions.InitMaxStreams getInitMaxStreams() {
    try {
        return javaChannel.getOption(SctpStandardSocketOptions.SCTP_INIT_MAXSTREAMS);
    } catch (IOException e) {
        throw new ChannelException(e);
    }
}
 
开发者ID:wuyinxian124,项目名称:netty4.0.27Learn,代码行数:9,代码来源:DefaultSctpChannelConfig.java

示例9: setInitMaxStreams

import com.sun.nio.sctp.SctpStandardSocketOptions; //导入依赖的package包/类
@Override
public SctpChannelConfig setInitMaxStreams(SctpStandardSocketOptions.InitMaxStreams initMaxStreams) {
    try {
        javaChannel.setOption(SctpStandardSocketOptions.SCTP_INIT_MAXSTREAMS, initMaxStreams);
    } catch (IOException e) {
        throw new ChannelException(e);
    }
    return this;
}
 
开发者ID:wuyinxian124,项目名称:netty4.0.27Learn,代码行数:10,代码来源:DefaultSctpChannelConfig.java

示例10: setSendBufferSize

import com.sun.nio.sctp.SctpStandardSocketOptions; //导入依赖的package包/类
@Override
public SctpServerChannelConfig setSendBufferSize(int sendBufferSize) {
    try {
        javaChannel.setOption(SctpStandardSocketOptions.SO_SNDBUF, sendBufferSize);
    } catch (IOException e) {
        throw new ChannelException(e);
    }
    return this;
}
 
开发者ID:nathanchen,项目名称:netty-netty-5.0.0.Alpha1,代码行数:10,代码来源:DefaultSctpServerChannelConfig.java

示例11: setReceiveBufferSize

import com.sun.nio.sctp.SctpStandardSocketOptions; //导入依赖的package包/类
@Override
public SctpServerChannelConfig setReceiveBufferSize(int receiveBufferSize) {
    try {
        javaChannel.setOption(SctpStandardSocketOptions.SO_RCVBUF, receiveBufferSize);
    } catch (IOException e) {
        throw new ChannelException(e);
    }
    return this;
}
 
开发者ID:nathanchen,项目名称:netty-netty-5.0.0.Alpha1,代码行数:10,代码来源:DefaultSctpServerChannelConfig.java

示例12: getInitMaxStreams

import com.sun.nio.sctp.SctpStandardSocketOptions; //导入依赖的package包/类
@Override
public InitMaxStreams getInitMaxStreams() {
    try {
        return javaChannel.getOption(SctpStandardSocketOptions.SCTP_INIT_MAXSTREAMS);
    } catch (IOException e) {
        throw new ChannelException(e);
    }
}
 
开发者ID:nathanchen,项目名称:netty-netty-5.0.0.Alpha1,代码行数:9,代码来源:DefaultSctpServerChannelConfig.java

示例13: setInitMaxStreams

import com.sun.nio.sctp.SctpStandardSocketOptions; //导入依赖的package包/类
@Override
public SctpServerChannelConfig setInitMaxStreams(InitMaxStreams initMaxStreams) {
    try {
        javaChannel.setOption(SctpStandardSocketOptions.SCTP_INIT_MAXSTREAMS, initMaxStreams);
    } catch (IOException e) {
        throw new ChannelException(e);
    }
    return this;
}
 
开发者ID:nathanchen,项目名称:netty-netty-5.0.0.Alpha1,代码行数:10,代码来源:DefaultSctpServerChannelConfig.java

示例14: defaultOptions

import com.sun.nio.sctp.SctpStandardSocketOptions; //导入依赖的package包/类
private static Set<SctpSocketOption<?>> defaultOptions() {
    HashSet<SctpSocketOption<?>> set = new HashSet<SctpSocketOption<?>>(1);
    set.add(SctpStandardSocketOptions.SCTP_INIT_MAXSTREAMS);
    return Collections.unmodifiableSet(set);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:6,代码来源:SctpServerChannelImpl.java


注:本文中的com.sun.nio.sctp.SctpStandardSocketOptions类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。