Home
last modified time | relevance | path

Searched refs:port (Results 1 – 25 of 119) 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.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()
DSocket.java214 public Socket(String host, int port) in Socket() argument
218 this(InetAddress.getAllByName(host), port, (SocketAddress) null, true); in Socket()
248 public Socket(InetAddress address, int port) throws IOException { in Socket() argument
250 this(nonNullAddress(address), port, (SocketAddress) null, true); in Socket()
289 public Socket(String host, int port, InetAddress localAddr, in Socket() argument
292 this(InetAddress.getAllByName(host), port, in Socket()
331 public Socket(InetAddress address, int port, InetAddress localAddr, in Socket() argument
334 this(nonNullAddress(address), port, in Socket()
380 public Socket(String host, int port, boolean stream) throws IOException { in Socket() argument
382 this(InetAddress.getAllByName(host), port, (SocketAddress) null, stream); in Socket()
[all …]
DCookieManager.java241 int port = uri.getPort(); in get() local
242 if (port == -1) { in get()
243 port = "https".equals(uri.getScheme()) ? 443 : 80; in get()
245 if (isInPortList(ports, port)) { in get()
338 int port = uri.getPort(); in put() local
339 if (port == -1) { in put()
340 port = "https".equals(uri.getScheme()) ? 443 : 80; in put()
345 cookie.setPortlist("" + port ); in put()
353 if (isInPortList(ports, port) && in put()
385 static private boolean isInPortList(String lst, int port) { in isInPortList() argument
[all …]
DDatagramSocket.java133 … private synchronized void connectInternal(InetAddress address, int port) throws SocketException { in connectInternal() argument
134 if (port < 0 || port > 0xFFFF) { in connectInternal()
135 throw new IllegalArgumentException("connect: " + port); in connectInternal()
148 security.checkConnect(address.getHostAddress(), port); in connectInternal() local
149 security.checkAccept(address.getHostAddress(), port); in connectInternal() local
169 getImpl().connect(address, port); in connectInternal()
192 connectedPort = port; in connectInternal()
290 public DatagramSocket(int port) throws SocketException { in DatagramSocket() argument
291 this(port, null); in DatagramSocket()
318 public DatagramSocket(int port, InetAddress laddr) throws SocketException { in DatagramSocket() argument
[all …]
DURLStreamHandler.java128 int port = u.getPort(); in parseURL() local
219 port = -1 ; in parseURL()
225 port = Integer.parseInt(nhost.substring(ind+1)); in parseURL()
238 port = -1; in parseURL()
246 port = Integer.parseInt(host.substring(ind + 1)); in parseURL()
259 if (port < -1) in parseURL()
261 port); in parseURL()
368 setURL(u, protocol, host, port, authority, userInfo, path, query, ref); in parseURL()
566 protected void setURL(URL u, String protocol, String host, int port, in setURL() argument
574 u.set(u.getProtocol(), host, port, authority, userInfo, path, query, ref); in setURL() local
[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/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()
DSocketTest.java276 Socket socket = new Socket("localhost", server.port); in testReadAfterClose()
298 Socket socket = new Socket("localhost", server.port); in testWriteAfterClose()
498 private int port = -1; field in SocketTest.MockServer
504 port = serverSocket.getLocalPort(); in MockServer()
541 public SocketThatFailOnClose(String host, int port)
543 super(host, port);
545 public SocketThatFailOnClose(InetAddress address, int port) throws IOException {
546 super(address, port);
548 public SocketThatFailOnClose(String host, int port, InetAddress localAddr,
550 super(host, port, localAddr, localPort);
[all …]
/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/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.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.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/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/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/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()

12345