Home
last modified time | relevance | path

Searched refs:port (Results 1 – 25 of 104) sorted by relevance

12345

/libcore/ojluni/src/main/java/java/net/
DInetSocketAddress.java63 private int port; field in InetSocketAddress.InetSocketAddressHolder
65 private InetSocketAddressHolder(String hostname, InetAddress addr, int port) { in InetSocketAddressHolder() argument
68 this.port = port; in InetSocketAddressHolder()
72 return port; in getPort()
106 return hostname + ":" + port; in toString()
108 return addr.toString() + ":" + port; in toString()
125 return sameIP && (port == that.port); in equals()
131 return addr.hashCode() + port; in hashCode()
133 return hostname.toLowerCase().hashCode() + port; in hashCode()
134 return port; in hashCode()
[all …]
DAbstractPlainSocketImpl.java117 protected void connect(String host, int port) in connect() argument
123 this.port = port; in connect()
126 connectToAddress(address, port, timeout); in connect()
146 protected void connect(InetAddress address, int port) throws IOException { in connect() argument
147 this.port = port; in connect()
151 connectToAddress(address, port, timeout); in connect()
179 this.port = addr.getPort(); in connect()
182 connectToAddress(this.address, port, timeout); in connect()
196 private void connectToAddress(InetAddress address, int port, int timeout) throws IOException { in connectToAddress() argument
198 doConnect(InetAddress.getLocalHost(), port, timeout); in connectToAddress() local
[all …]
DDatagramPacket.java63 int port; field in DatagramPacket
81 this.port = -1; in DatagramPacket()
115 InetAddress address, int port) { in DatagramPacket() argument
118 setPort(port); in DatagramPacket()
167 InetAddress address, int port) { in DatagramPacket() argument
168 this(buf, 0, length, address, port); in DatagramPacket()
210 return port; in getPort()
314 port = iport; in setPort()
DURL.java171 private int port = -1; field in URL
304 public URL(String protocol, String host, int port, String file) in URL() argument
307 this(protocol, host, port, file, null); in URL()
372 public URL(String protocol, String host, int port, String file, in URL() argument
395 if (port < -1) { in URL()
397 port); in URL()
399 this.port = port; in URL()
400 authority = (port == -1) ? host : host + ":" + port; in URL()
582 port = context.port; in URL()
668 void set(String protocol, String host, int port, in set() argument
[all …]
DCookieManager.java223 int port = uri.getPort(); in get() local
224 if (port == -1) { in get()
225 port = "https".equals(uri.getScheme()) ? 443 : 80; in get()
227 if (isInPortList(ports, port)) { in get()
318 int port = uri.getPort(); in put() local
319 if (port == -1) { in put()
320 port = "https".equals(uri.getScheme()) ? 443 : 80; in put()
325 cookie.setPortlist("" + port ); in put()
333 if (isInPortList(ports, port) && in put()
365 static private boolean isInPortList(String lst, int port) { in isInPortList() argument
[all …]
DSocket.java214 public Socket(String host, int port) in Socket() argument
217 this(InetAddress.getAllByName(host), port, (SocketAddress) null, true); in Socket()
247 public Socket(InetAddress address, int port) throws IOException { in Socket() argument
248 this(nonNullAddress(address), port, (SocketAddress) null, true); in Socket()
287 public Socket(String host, int port, InetAddress localAddr, in Socket() argument
289 this(InetAddress.getAllByName(host), port, in Socket()
328 public Socket(InetAddress address, int port, InetAddress localAddr, in Socket() argument
330 this(nonNullAddress(address), port, in Socket()
376 public Socket(String host, int port, boolean stream) throws IOException { in Socket() argument
377 this(InetAddress.getAllByName(host), port, (SocketAddress) null, stream); in Socket()
[all …]
DDatagramSocket.java132 … private synchronized void connectInternal(InetAddress address, int port) throws SocketException { in connectInternal() argument
133 if (port < 0 || port > 0xFFFF) { in connectInternal()
134 throw new IllegalArgumentException("connect: " + port); in connectInternal()
147 security.checkConnect(address.getHostAddress(), port); in connectInternal() local
148 security.checkAccept(address.getHostAddress(), port); in connectInternal() local
168 getImpl().connect(address, port); in connectInternal()
191 connectedPort = port; in connectInternal()
289 public DatagramSocket(int port) throws SocketException { in DatagramSocket() argument
290 this(port, null); in DatagramSocket()
317 public DatagramSocket(int port, InetAddress laddr) throws SocketException { in DatagramSocket() argument
[all …]
/libcore/ojluni/src/main/java/javax/net/
DSocketFactory.java163 public abstract Socket createSocket(String host, int port) in createSocket() argument
195 createSocket(String host, int port, InetAddress localHost, int localPort) in createSocket() argument
221 public abstract Socket createSocket(InetAddress host, int port) in createSocket() argument
252 createSocket(InetAddress address, int port, in createSocket() argument
276 public Socket createSocket(String host, int port) in createSocket() argument
279 return new Socket(host, port); in createSocket()
282 public Socket createSocket(InetAddress address, int port) in createSocket() argument
285 return new Socket(address, port); in createSocket()
288 public Socket createSocket(String host, int port, in createSocket() argument
292 return new Socket(host, port, clientAddress, clientPort); in createSocket()
[all …]
DServerSocketFactory.java123 public abstract ServerSocket createServerSocket(int port) in createServerSocket() argument
154 createServerSocket(int port, int backlog) in createServerSocket() argument
192 createServerSocket(int port, int backlog, InetAddress ifAddress) in createServerSocket() argument
215 public ServerSocket createServerSocket(int port) in createServerSocket() argument
218 return new ServerSocket(port); in createServerSocket()
221 public ServerSocket createServerSocket(int port, int backlog) in createServerSocket() argument
224 return new ServerSocket(port, backlog); in createServerSocket()
228 createServerSocket(int port, int backlog, InetAddress ifAddress) in createServerSocket() argument
231 return new ServerSocket(port, backlog, ifAddress); in createServerSocket()
/libcore/support/src/test/java/tests/net/
DDelegatingSSLSocketFactory.java65 public Socket createSocket(Socket s, String host, int port, boolean autoClose) in createSocket() argument
67 SSLSocket socket = (SSLSocket) mDelegate.createSocket(s, host, port, autoClose); in createSocket()
72 public Socket createSocket(String host, int port) throws IOException, UnknownHostException { in createSocket() argument
73 SSLSocket socket = (SSLSocket) mDelegate.createSocket(host, port); in createSocket()
78 public Socket createSocket(String host, int port, InetAddress localHost, int localPort) in createSocket() argument
80 SSLSocket socket = (SSLSocket) mDelegate.createSocket(host, port, localHost, localPort); in createSocket()
85 public Socket createSocket(InetAddress host, int port) throws IOException { in createSocket() argument
86 SSLSocket socket = (SSLSocket) mDelegate.createSocket(host, port); in createSocket()
91 public Socket createSocket(InetAddress address, int port, InetAddress localAddress, in createSocket() argument
93 SSLSocket socket = (SSLSocket) mDelegate.createSocket(address, port, localAddress, localPort); in createSocket()
DDelegatingSocketFactory.java53 public Socket createSocket(String host, int port) throws IOException, UnknownHostException { in createSocket() argument
54 Socket socket = mDelegate.createSocket(host, port); in createSocket()
59 public Socket createSocket(String host, int port, InetAddress localHost, int localPort) in createSocket() argument
61 Socket socket = mDelegate.createSocket(host, port, localHost, localPort); in createSocket()
66 public Socket createSocket(InetAddress host, int port) throws IOException { in createSocket() argument
67 Socket socket = mDelegate.createSocket(host, port); in createSocket()
72 public Socket createSocket(InetAddress address, int port, InetAddress localAddress, in createSocket() argument
74 Socket socket = mDelegate.createSocket(address, port, localAddress, localPort); in createSocket()
/libcore/ojluni/src/main/java/java/util/logging/
DSocketHandler.java86 private int port; field in SocketHandler
108 port = manager.getIntProperty(cname + ".port", 0); in configure()
129 System.err.println("SocketHandler: connect failed to " + host + ":" + port); in SocketHandler()
150 public SocketHandler(String host, int port) throws IOException { in SocketHandler() argument
154 this.port = port; in SocketHandler()
161 if (port == 0) { in connect()
162 throw new IllegalArgumentException("Bad port: " + port); in connect()
173 sock = new Socket(host, port); in connect()
/libcore/ojluni/src/main/java/java/security/cert/
DLDAPCertStoreParameters.java54 private int port; field in LDAPCertStoreParameters
70 public LDAPCertStoreParameters(String serverName, int port) { in LDAPCertStoreParameters() argument
74 this.port = port; in LDAPCertStoreParameters()
112 return port; in getPort()
145 sb.append(" port: " + port + "\n"); in toString()
/libcore/ojluni/src/main/java/javax/net/ssl/
DSSLSocket.java902 protected SSLSocket(String host, int port) in SSLSocket() argument
904 { super(host, port); } in SSLSocket()
927 protected SSLSocket(InetAddress address, int port) in SSLSocket() argument
929 { super(address, port); } in SSLSocket()
958 protected SSLSocket(String host, int port, in SSLSocket() argument
961 { super(host, port, clientAddress, clientPort); } in SSLSocket()
989 protected SSLSocket(InetAddress address, int port, in SSLSocket() argument
992 { super(address, port, clientAddress, clientPort); } in SSLSocket()
DSSLServerSocket.java98 protected SSLServerSocket(int port) in SSLServerSocket() argument
100 { super(port); } in SSLServerSocket()
134 protected SSLServerSocket(int port, int backlog) in SSLServerSocket() argument
136 { super(port, backlog); } in SSLServerSocket()
179 protected SSLServerSocket(int port, int backlog, InetAddress address) in SSLServerSocket() argument
181 { super(port, backlog, address); } in SSLServerSocket()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/javax/net/ssl/
DSSLEngineTest.java72 int port = 1010; in test_ConstructorLjava_lang_StringI01() local
73 SSLEngine e = getEngine(null, port); in test_ConstructorLjava_lang_StringI01()
75 assertEquals(e.getPeerPort(), port); in test_ConstructorLjava_lang_StringI01() local
82 e = getEngine(null, port); in test_ConstructorLjava_lang_StringI01()
86 e = getEngine(null, port); in test_ConstructorLjava_lang_StringI01()
96 int port = 8080; in test_ConstructorLjava_lang_StringI02() local
97 SSLEngine e = getEngine(host, port); in test_ConstructorLjava_lang_StringI02()
99 assertEquals(e.getPeerPort(), port); in test_ConstructorLjava_lang_StringI02() local
328 int port = 8080; in test_unwrap_02() local
332 SSLEngine sse = getEngine(host, port); in test_unwrap_02()
[all …]
/libcore/ojluni/src/main/java/sun/net/util/
DURLUtil.java61 int port = url.getPort(); in urlNoFragString() local
62 if (port == -1) { in urlNoFragString()
65 port = url.getDefaultPort(); in urlNoFragString()
67 if (port != -1) { in urlNoFragString()
68 strForm.append(":").append(port); in urlNoFragString()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/net/
DInetSocketAddressTest.java50 legalHostPortPairs[i].host, legalHostPortPairs[i].port); in test_createUnresolvedLjava_lang_StringI()
54 assertEquals(isa.getPort(), legalHostPortPairs[i].port); in test_createUnresolvedLjava_lang_StringI()
68 illegalHostPortPairs[i].port); in test_createUnresolvedLjava_lang_StringI_IllegalArgumentException()
71 + illegalHostPortPairs[i].port); in test_createUnresolvedLjava_lang_StringI_IllegalArgumentException()
84 int port; field in InetSocketAddressTest.HostPortPair
86 public HostPortPair(String host, int port) { in HostPortPair() argument
88 this.port = port; in HostPortPair()
/libcore/luni/src/main/native/
DNetworkUtilities.cpp31 jobject sockaddrToInetAddress(JNIEnv* env, const sockaddr_storage& ss, jint* port) { in sockaddrToInetAddress() argument
46 return sockaddrToInetAddress(env, tmp, port); in sockaddrToInetAddress()
71 if (port != NULL) { in sockaddrToInetAddress()
72 *port = sin_port; in sockaddrToInetAddress()
91 static bool inetAddressToSockaddr(JNIEnv* env, jobject inetAddress, int port, sockaddr_storage& ss,… in inetAddressToSockaddr() argument
146 sin6.sin6_port = htons(port); in inetAddressToSockaddr()
182 sin.sin_port = htons(port); in inetAddressToSockaddr()
190 bool inetAddressToSockaddrVerbatim(JNIEnv* env, jobject inetAddress, int port, sockaddr_storage& ss… in inetAddressToSockaddrVerbatim() argument
191 return inetAddressToSockaddr(env, inetAddress, port, ss, sa_len, false); in inetAddressToSockaddrVerbatim()
194 bool inetAddressToSockaddr(JNIEnv* env, jobject inetAddress, int port, sockaddr_storage& ss, sockle… in inetAddressToSockaddr() argument
[all …]
DNetworkUtilities.h23 jobject sockaddrToInetAddress(JNIEnv* env, const sockaddr_storage& ss, int* port);
29 bool inetAddressToSockaddr(JNIEnv* env, jobject inetAddress, int port,
38 bool inetAddressToSockaddrVerbatim(JNIEnv* env, jobject inetAddress, int port,
/libcore/ojluni/src/main/java/sun/net/
DNetworkClient.java132 public void openServer(String server, int port) in openServer() argument
136 serverSocket = doConnect (server, port); in openServer()
151 protected Socket doConnect (String server, int port) in doConnect() argument
175 s.connect(new InetSocketAddress(server, port), connectTimeout); in doConnect()
178 s.connect(new InetSocketAddress(server, port), defaultConnectTimeout); in doConnect()
180 s.connect(new InetSocketAddress(server, port)); in doConnect()
229 public NetworkClient(String host, int port) throws IOException {
230 openServer(host, port);
/libcore/support/src/test/java/libcore/javax/net/ssl/
DTestSSLContext.java100 public final int port; field in TestSSLContext
191 …public InetSocketAddress getLoopbackAsHostname(String hostname, int port) throws IOException, Clas… in getLoopbackAsHostname() argument
192 InetSocketAddress addr = new InetSocketAddress(InetAddress.getLoopbackAddress(), port); in getLoopbackAsHostname()
215 int port) { in TestSSLContext() argument
228 this.port = port; in TestSSLContext()
295 int port = serverSocket.getLocalPort(); in create() local
304 serverSocket, host, port); in create()
391 public Socket createSocket(String host, int port) in clientAuth() argument
393 return set(sf.createSocket(host, port)); in clientAuth()
395 public Socket createSocket(String host, int port, InetAddress localHost, int localPort) in clientAuth() argument
[all …]
/libcore/benchmarks/src/benchmarks/regression/
DSSLSocketBenchmark.java44 final int port; field in SSLSocketBenchmark.WebSite
55 this.port = 443; in WebSite()
58 this.port = p; in WebSite()
59 portString = ":" + port; in WebSite()
83 Socket s = sf.createSocket(webSite.host, webSite.port); in time()
/libcore/support/src/test/java/org/apache/harmony/xnet/tests/support/
DSSLContextSpiImpl.java61 public SSLEngine engineCreateSSLEngine(String host, int port) { in engineCreateSSLEngine() argument
64 if (port < 0 || port > max) { in engineCreateSSLEngine()
71 return new tmpSSLEngine(host, port); in engineCreateSSLEngine()
/libcore/ojluni/src/main/java/sun/nio/ch/
DUnixAsynchronousServerSocketChannelImpl.java55 private final Port port; field in UnixAsynchronousServerSocketChannelImpl
81 UnixAsynchronousServerSocketChannelImpl(Port port) in UnixAsynchronousServerSocketChannelImpl() argument
84 super(port); in UnixAsynchronousServerSocketChannelImpl()
92 this.port = port; in UnixAsynchronousServerSocketChannelImpl()
96 port.register(fdVal, this); in UnixAsynchronousServerSocketChannelImpl()
106 port.unregister(fdVal); in implClose()
149 return port; in group()
176 port.startPoll(fdVal, Net.POLLIN); in onEvent()
235 ch = new UnixAsynchronousSocketChannelImpl(port, newfd, remote); in finishAccept()
327 port.startPoll(fdVal, Net.POLLIN); in implAccept()

12345