@Override
public Object getOption(int optID) throws SocketException {
if (optID == SocketOptions.SO_TIMEOUT) {
return Integer.valueOf(receiveTimeout);
} else if (optID == SocketOptions.IP_TOS) {
return Integer.valueOf(trafficClass);
} else {
// Call the native first so there will be
// an exception if the socket if closed.
Object result = netImpl.getSocketOption(fd, optID);
if (optID == SocketOptions.TCP_NODELAY
&& (netImpl.getSocketFlags() & TCP_NODELAY) != 0) {
return Boolean.valueOf(tcpNoDelay);
}
return result;
}
}
PlainSocketImpl.java 文件源码
java
阅读 19
收藏 0
点赞 0
评论 0
项目:cn1
作者:
评论列表
文章目录