本文整理了Java中org.apache.tomcat.jni.Address.info()
方法的一些代码示例,展示了Address.info()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Address.info()
方法的具体详情如下:
包路径:org.apache.tomcat.jni.Address
类名称:Address
方法名:info
[英]Create apr_sockaddr_t from hostname, address family, and port.
[中]从主机名、地址系列和端口创建apr\u sockaddr\u t。
代码示例来源:origin: apache/cloudstack
/**
* Connect this socket wrapper to remote server and start main loop on
* AprSocketSource stdout link, to watch for incoming data, and
* AprSocketSink stdin link, to pull for outgoing data.
*/
@Override
public void connect(InetSocketAddress address) throws IOException {
try {
inetAddress = Address.info(address.getHostName(), Socket.APR_UNSPEC, address.getPort(), 0, pool);
socket = Socket.create(Address.getInfo(inetAddress).family, Socket.SOCK_STREAM, Socket.APR_PROTO_TCP, pool);
} catch (Exception e) {
throw new IOException("[" + this + "] ERROR: Cannot create socket for \"" + address + "\".", e);
}
int ret = Socket.connect(socket, inetAddress);
if (ret != 0)
throw new IOException("[" + this + "] ERROR: Cannot connect to remote host \"" + address + "\": " + Error.strerror(ret));
source.setSocket(socket);
sink.setSocket(socket);
// Start polling for data to send to remote sever
runMainLoop(IN, STDIN, true, true);
// Push incoming data from server to handlers
runMainLoop(OUT, STDOUT, false, false);
}
代码示例来源:origin: jboss.web/jbossweb
long socket = Socket.create(serverAddressFamily, Socket.SOCK_STREAM,
Socket.APR_PROTO_TCP, rootPool);
long inetAddress = Address.info(addressStr, serverAddressFamily,
listsock[i].port, 0, rootPool);
if (Socket.connect(socket, inetAddress) != 0) {
代码示例来源:origin: codefollower/Tomcat-Research
Address.info(null, family, port, 0, serverSockPool);
代码示例来源:origin: codefollower/Tomcat-Research
long inetAddress = Address.info(hi.host, Socket.APR_INET,
hi.port, 0, rootPool);
代码示例来源:origin: org.apache.coyote.springsource/com.springsource.org.apache.coyote.springsource
long inetAddress = Address.info(addressStr, family,
port, 0, rootPool);
代码示例来源:origin: org.jboss.web/jbossweb
long inetAddress = Address.info(addressStr, family,
port, 0, rootPool);
代码示例来源:origin: jboss.web/jbossweb
long inetAddress = Address.info(addressStr, family,
port, 0, rootPool);
代码示例来源:origin: org.apache.coyote/com.springsource.org.apache.coyote
long inetAddress = Address.info(addressStr, family,
getPort(), 0, rootPool);
代码示例来源:origin: org.jboss.web/jbossweb
long socket = Socket.create(serverAddressFamily, Socket.SOCK_STREAM,
Socket.APR_PROTO_TCP, rootPool);
long inetAddress = Address.info(addressStr, serverAddressFamily,
listsock[i].port, 0, rootPool);
if (Socket.connect(socket, inetAddress) != 0) {
代码示例来源:origin: com.ovea.tajin.server/tajin-server-tomcat7
long inetAddress = Address.info(addressStr, family,
getPort(), 0, rootPool);
代码示例来源:origin: codefollower/Tomcat-Research
long inetAddress = Address.info(addressStr, family,
getPort(), 0, rootPool);
代码示例来源:origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core
long inetAddress = Address.info(addressStr, family,
getPort(), 0, rootPool);
代码示例来源:origin: org.apache.geronimo.ext.tomcat/catalina
long inetAddress = Address.info(addressStr, family,
getPort(), 0, rootPool);
内容来源于网络,如有侵权,请联系作者删除!