java.net.Socket.getReuseAddress()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(3.3k)|赞(0)|评价(0)|浏览(304)

本文整理了Java中java.net.Socket.getReuseAddress()方法的一些代码示例,展示了Socket.getReuseAddress()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Socket.getReuseAddress()方法的具体详情如下:
包路径:java.net.Socket
类名称:Socket
方法名:getReuseAddress

Socket.getReuseAddress介绍

[英]Returns this socket's SocketOptions#SO_REUSEADDR setting.
[中]返回此套接字的SocketOptions#SO _REUSEADDR设置。

代码示例

代码示例来源:origin: aws/aws-sdk-java

@Override
public boolean getReuseAddress() throws SocketException {
  return sock.getReuseAddress();
}

代码示例来源:origin: netty/netty

@Override
public boolean isReuseAddress() {
  try {
    return javaSocket.getReuseAddress();
  } catch (SocketException e) {
    throw new ChannelException(e);
  }
}

代码示例来源:origin: redisson/redisson

@Override
public boolean isReuseAddress() {
  try {
    return javaSocket.getReuseAddress();
  } catch (SocketException e) {
    throw new ChannelException(e);
  }
}

代码示例来源:origin: apache/zookeeper

/**
 * See {@link Socket#getReuseAddress()}. Calling this method does not trigger mode detection.
 */
@Override
public boolean getReuseAddress() throws SocketException {
  return getSocketAllowUnknownMode().getReuseAddress();
}

代码示例来源:origin: wildfly/wildfly

@Override
public boolean isReuseAddress() {
  try {
    return javaSocket.getReuseAddress();
  } catch (SocketException e) {
    throw new ChannelException(e);
  }
}

代码示例来源:origin: io.netty/netty

public boolean isReuseAddress() {
  try {
    return socket.getReuseAddress();
  } catch (SocketException e) {
    throw new ChannelException(e);
  }
}

代码示例来源:origin: stackoverflow.com

return delegate.getReuseAddress();

代码示例来源:origin: stackoverflow.com

return delegate.getReuseAddress();

代码示例来源:origin: stackoverflow.com

return delegate.getReuseAddress();

代码示例来源:origin: com.sun.mail/javax.mail

@Override
public boolean getReuseAddress() throws SocketException {
  return socket.getReuseAddress();
}

代码示例来源:origin: com.amazonaws/aws-java-sdk-core

@Override
public boolean getReuseAddress() throws SocketException {
  return sock.getReuseAddress();
}

代码示例来源:origin: camunda/camunda-bpm-platform

@Override
public boolean getReuseAddress() throws SocketException {
  return socket.getReuseAddress();
}

代码示例来源:origin: spring-projects/spring-integration

public boolean getReuseAddress() throws SocketException {
  return this.socket.getReuseAddress();
}

代码示例来源:origin: apache/mina

/**
 * {@inheritDoc}
 */
@Override
public Boolean isReuseAddress() {
  try {
    return socket.getReuseAddress();
  } catch (SocketException e) {
    throw new ConfigurationException(e);
  }
}

代码示例来源:origin: org.apache.logging.log4j/log4j-core

Assert.assertEquals(false, socket.getReuseAddress());
Assert.assertEquals(false, socket.getTcpNoDelay());

代码示例来源:origin: org.apache.logging.log4j/log4j-core

Assert.assertEquals(false, socket.getReuseAddress());
Assert.assertEquals(false, socket.getTcpNoDelay());

代码示例来源:origin: jitsi/ice4j

/**
 * {@inheritDoc}
 */
@Override
public boolean getReuseAddress() throws SocketException
{
  return
    (delegate == null)
      ? super.getReuseAddress()
      : delegate.getReuseAddress();
}

代码示例来源:origin: jboss.remoting/jboss-remoting

/**
 * See superclass javadoc.
 */
  public boolean getReuseAddress() throws SocketException
  {
   if (actualSocket == null)
     return true;
   else
     return actualSocket.getReuseAddress();
  }

代码示例来源:origin: apache/activemq-artemis

@Override
public boolean isReuseAddress() {
  try {
    return javaSocket.getReuseAddress();
  } catch (SocketException e) {
    throw new ChannelException(e);
  }
}

代码示例来源:origin: org.apache.mina/mina-core

/**
 * {@inheritDoc}
 */
@Override
public boolean isReuseAddress() {
  try {
    return getSocket().getReuseAddress();
  } catch (SocketException e) {
    throw new RuntimeIoException(e);
  }
}

相关文章