Home
last modified time | relevance | path

Searched refs:port (Results 1 – 25 of 125) 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()
118 return formatted + ":" + port; in toString()
134 return sameIP && (port == that.port); in equals()
140 return addr.hashCode() + port; in hashCode()
142 return hostname.toLowerCase().hashCode() + port; in hashCode()
143 return port; in hashCode()
152 private static int checkPort(int port) { in checkPort() argument
[all …]
DAbstractPlainSocketImpl.java147 protected void connect(String host, int port) in connect() argument
153 this.port = port; in connect()
156 connectToAddress(address, port, timeout); in connect()
176 protected void connect(InetAddress address, int port) throws IOException { in connect() argument
177 this.port = port; in connect()
181 connectToAddress(address, port, timeout); in connect()
209 this.port = addr.getPort(); in connect()
212 connectToAddress(this.address, port, timeout); in connect()
226 private void connectToAddress(InetAddress address, int port, int timeout) throws IOException { in connectToAddress() argument
228 doConnect(InetAddress.getLocalHost(), port, timeout); in connectToAddress() local
[all …]
DURL.java181 private int port = -1; field in URL
313 public URL(String protocol, String host, int port, String file) in URL() argument
316 this(protocol, host, port, file, null); in URL()
381 public URL(String protocol, String host, int port, String file, in URL() argument
404 if (port < -1) { in URL()
406 port); in URL()
408 this.port = port; in URL()
409 authority = (port == -1) ? host : host + ":" + port; in URL()
593 port = context.port; in URL()
679 void set(String protocol, String host, int port, in set() argument
[all …]
DDatagramPacket.java72 int port; field in DatagramPacket
90 this.port = -1; in DatagramPacket()
124 InetAddress address, int port) { in DatagramPacket() argument
127 setPort(port); in DatagramPacket()
176 InetAddress address, int port) { in DatagramPacket() argument
177 this(buf, 0, length, address, port); in DatagramPacket()
219 return port; in getPort()
323 port = iport; in setPort()
DCookieManager.java239 int port = uri.getPort(); in get() local
240 if (port == -1) { in get()
241 port = "https".equals(uri.getScheme()) ? 443 : 80; in get()
243 if (isInPortList(ports, port)) { in get()
335 int port = uri.getPort(); in put() local
336 if (port == -1) { in put()
337 port = "https".equals(uri.getScheme()) ? 443 : 80; in put()
342 cookie.setPortlist("" + port ); in put()
350 if (isInPortList(ports, port) && in put()
382 private static boolean isInPortList(String lst, int port) { in isInPortList() argument
[all …]
DSocket.java239 public Socket(String host, int port) in Socket() argument
243 this(InetAddress.getAllByName(host), port, (SocketAddress) null, true); in Socket()
273 public Socket(InetAddress address, int port) throws IOException { in Socket() argument
275 this(nonNullAddress(address), port, (SocketAddress) null, true); in Socket()
314 public Socket(String host, int port, InetAddress localAddr, in Socket() argument
317 this(InetAddress.getAllByName(host), port, in Socket()
356 public Socket(InetAddress address, int port, InetAddress localAddr, in Socket() argument
359 this(nonNullAddress(address), port, in Socket()
405 public Socket(String host, int port, boolean stream) throws IOException { in Socket() argument
407 this(InetAddress.getAllByName(host), port, (SocketAddress) null, stream); in Socket()
[all …]
DDatagramSocket.java135 … private synchronized void connectInternal(InetAddress address, int port) throws SocketException { in connectInternal() argument
136 if (port < 0 || port > 0xFFFF) { in connectInternal()
137 throw new IllegalArgumentException("connect: " + port); in connectInternal()
150 security.checkConnect(address.getHostAddress(), port); in connectInternal() local
151 security.checkAccept(address.getHostAddress(), port); in connectInternal() local
171 getImpl().connect(address, port); in connectInternal()
194 connectedPort = port; in connectInternal()
292 public DatagramSocket(int port) throws SocketException { in DatagramSocket() argument
293 this(port, null); in DatagramSocket()
320 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/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()
174 sock = new Socket(host, port); in connect()
/libcore/luni/src/test/java/libcore/java/net/
DDelegatingSocketFactory.java52 public Socket createSocket(String host, int port) throws IOException { in createSocket() argument
53 Socket socket = mDelegate.createSocket(host, port); in createSocket()
58 public Socket createSocket(String host, int port, InetAddress localHost, int localPort) in createSocket() argument
60 Socket socket = mDelegate.createSocket(host, port, localHost, localPort); in createSocket()
65 public Socket createSocket(InetAddress host, int port) throws IOException { in createSocket() argument
66 Socket socket = mDelegate.createSocket(host, port); in createSocket()
71 public Socket createSocket(InetAddress address, int port, InetAddress localAddress, in createSocket() argument
73 Socket socket = mDelegate.createSocket(address, port, localAddress, localPort); in createSocket()
DAuthenticatorTest.java86 final int port = 42; in testRequestPasswordAuthentication() local
98 addr, port, protocol, prompt, scheme); in testRequestPasswordAuthentication()
106 assertEquals(port, auth.getPort()); in testRequestPasswordAuthentication()
112 host, addr, port, protocol, prompt, scheme); in testRequestPasswordAuthentication()
121 assertEquals(port, auth.getPort()); in testRequestPasswordAuthentication()
131 final int port = 42; in testRequestPasswordAuthenticationWithNullAuthenticator() local
138 addr, port, protocol, prompt, scheme)); in testRequestPasswordAuthenticationWithNullAuthenticator()
141 host, addr, port, protocol, prompt, scheme)); in testRequestPasswordAuthenticationWithNullAuthenticator()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/javax/net/ssl/
DSSLEngineTest.java75 int port = 1010; in test_ConstructorLjava_lang_StringI01() local
76 SSLEngine e = getEngine(null, port); in test_ConstructorLjava_lang_StringI01()
78 assertEquals(e.getPeerPort(), port); in test_ConstructorLjava_lang_StringI01() local
85 e = getEngine(null, port); in test_ConstructorLjava_lang_StringI01()
89 e = getEngine(null, port); in test_ConstructorLjava_lang_StringI01()
99 int port = 8080; in test_ConstructorLjava_lang_StringI02() local
100 SSLEngine e = getEngine(host, port); in test_ConstructorLjava_lang_StringI02()
102 assertEquals(e.getPeerPort(), port); in test_ConstructorLjava_lang_StringI02() local
113 int port = 8080; in test_ConstructorLjava_lang_StringI03() local
114 SSLEngine e = getRawEngine(host, port); in test_ConstructorLjava_lang_StringI03()
[all …]
/libcore/ojluni/src/main/java/java/security/cert/
DLDAPCertStoreParameters.java59 private int port; field in LDAPCertStoreParameters
75 public LDAPCertStoreParameters(String serverName, int port) { in LDAPCertStoreParameters() argument
79 this.port = port; in LDAPCertStoreParameters()
117 return port; in getPort()
150 sb.append(" port: " + port + "\n"); in toString()
/libcore/ojluni/src/main/java/javax/net/ssl/
DSSLSocket.java929 protected SSLSocket(String host, int port) in SSLSocket() argument
931 { super(host, port); } in SSLSocket()
954 protected SSLSocket(InetAddress address, int port) in SSLSocket() argument
956 { super(address, port); } in SSLSocket()
985 protected SSLSocket(String host, int port, in SSLSocket() argument
988 { super(host, port, clientAddress, clientPort); } in SSLSocket()
1016 protected SSLSocket(InetAddress address, int port, in SSLSocket() argument
1019 { 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/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/ojluni/annotations/hiddenapi/java/net/
DInetSocketAddress.java38 public InetSocketAddress(int port) { in InetSocketAddress() argument
42 public InetSocketAddress(java.net.InetAddress addr, int port) { in InetSocketAddress() argument
46 public InetSocketAddress(java.lang.String hostname, int port) { in InetSocketAddress() argument
50 private InetSocketAddress(int port, java.lang.String hostname) { in InetSocketAddress() argument
54 private static int checkPort(int port) { in checkPort() argument
62 public static java.net.InetSocketAddress createUnresolved(java.lang.String host, int port) { in createUnresolved() argument
142 java.lang.String hostname, java.net.InetAddress addr, int port) { in InetSocketAddressHolder() argument
182 private int port; field in InetSocketAddress.InetSocketAddressHolder
/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/luni/src/test/java/libcore/javax/net/ssl/
DFakeSSLSocketFactory.java40 public Socket createSocket(Socket s, String host, int port, boolean autoClose) { in createSocket() argument
45 public Socket createSocket(InetAddress address, int port, InetAddress localAddress, in createSocket() argument
51 public Socket createSocket(InetAddress host, int port) { in createSocket() argument
56 public Socket createSocket(String host, int port, InetAddress localHost, int localPort) { in createSocket() argument
61 public Socket createSocket(String host, int port) { in createSocket() argument
/libcore/ojluni/src/test/java/net/Socks/
DSocksServer.java59 private int port; field in SocksServer
202 int port = ((in.read() & 0xff) << 8); in getRequestV4() local
203 port += (in.read() & 0xff); in getRequestV4()
214 dest = new Socket(addr, port); in getRequestV4()
232 out.write((port >> 8) & 0xff); in getRequestV4()
233 out.write(port & 0xff); in getRequestV4()
412 int port = 0; in getRequest() local
439 port = ((in.read()&0xff) << 8); in getRequest()
440 port += (in.read()&0xff); in getRequest()
442 InetSocketAddress socAddr = new InetSocketAddress(addr, port); in getRequest()
[all …]
/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/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/ojluni/src/main/java/sun/nio/ch/
DUnixAsynchronousServerSocketChannelImpl.java51 private final Port port; field in UnixAsynchronousServerSocketChannelImpl
78 UnixAsynchronousServerSocketChannelImpl(Port port) in UnixAsynchronousServerSocketChannelImpl() argument
81 super(port); in UnixAsynchronousServerSocketChannelImpl()
89 this.port = port; in UnixAsynchronousServerSocketChannelImpl()
93 port.register(fdVal, this); in UnixAsynchronousServerSocketChannelImpl()
103 port.unregister(fdVal); in implClose()
147 return port; in group()
174 port.startPoll(fdVal, Net.POLLIN); in onEvent()
233 ch = new UnixAsynchronousSocketChannelImpl(port, newfd, remote); in finishAccept()
325 port.startPoll(fdVal, Net.POLLIN); in implAccept()
/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()

12345