/libcore/luni/src/main/java/java/net/ |
H A D | URL.java | 87 private int port = -1; field in class:URL 196 * protocol's default port. 207 * protocol's default port. 210 * @param port the port, or {@code -1} for the protocol's default port. 215 public URL(String protocol, String host, int port, String file) throws MalformedURLException { argument 216 this(protocol, host, port, file, null); 221 * protocol's default port. 224 * @param port th 231 URL(String protocol, String host, int port, String file, URLStreamHandler handler) argument 305 set(String protocol, String host, int port, String file, String ref) argument 663 set(String protocol, String host, int port, String authority, String userInfo, String path, String query, String ref) argument [all...] |
H A D | Authenticator.java | 38 private int port; field in class:Authenticator 59 * Returns the port of the connection that requests authorization. 61 * @return port of the connection. 64 return this.port; 115 * port of the connection that requests authentication. 132 thisAuthenticator.port = rPort; 165 * port of the connection that requests authentication. 183 thisAuthenticator.port = rPort; 215 * port of the connection that requests authentication. 238 thisAuthenticator.port [all...] |
H A D | URLStreamHandler.java | 97 int port = -1; 117 * Extract the host and port. The host may be an IPv6 address with 118 * colons like "[::1]", in which case we look for the port delimiter 134 port = Integer.parseInt(spec.substring(portStart, fileStart)); 135 if (port < 0) { 136 throw new IllegalArgumentException("port < 0: " + port); 151 port = url.getPort(); 192 setURL(url, url.getProtocol(), host, port, authority, userInfo, path, query, ref); 219 * @param port 229 setURL(URL u, String protocol, String host, int port, String file, String ref) argument 241 setURL(URL u, String protocol, String host, int port, String authority, String userInfo, String path, String query, String ref) argument [all...] |
H A D | HttpURLConnection.java | 569 * with the host and the port number as the target name and {@code 570 * "resolve, connect"} as the action list. If the port number of this URL 571 * instance is lower than {@code 0} the port will be set to {@code 80}. 580 int port = url.getPort(); 581 if (port < 0) { 582 port = 80; 584 return new SocketPermission(url.getHost() + ":" + port,
|
H A D | DatagramSocket.java | 43 int port = -1; field in class:DatagramSocket 58 * Constructs a UDP datagram socket which is bound to any available port on 69 * Constructs a UDP datagram socket which is bound to the specific port 74 * the port to bind on the localhost. 85 * address {@code addr} on port {@code aPort}. Valid values for {@code 89 * the port to bind on the localhost. 126 port = -1; 167 * Gets the local port which this socket is bound to. 169 * @return the local port of this socket or {@code -1} if this socket is 183 * Gets the remote port whic 502 connect(InetAddress address, int port) argument [all...] |
H A D | PlainDatagramSocketImpl.java | 67 @Override public void bind(int port, InetAddress address) throws SocketException { argument 68 IoBridge.bind(fd, address, port); 69 if (port != 0) { 70 localPort = port; 180 int port = isNativeConnected ? 0 : packet.getPort(); 182 IoBridge.sendto(fd, packet.getData(), packet.getOffset(), packet.getLength(), 0, address, port); 200 public void connect(InetAddress inetAddr, int port) throws SocketException { argument 201 IoBridge.connect(fd, inetAddr, port); // Throws on failure. 209 connectedPort = port; 228 * Set the received address and port i [all...] |
H A D | DatagramSocketImpl.java | 34 * The number of the local port to which this socket is bound. 46 * Binds the datagram socket to the given localhost/port. Sockets must be 49 * @param port 50 * the port on the localhost to bind. 54 * if an error occurs while binding, for example, if the port 57 protected abstract void bind(int port, InetAddress addr) throws SocketException; argument 84 * Returns the local port to which this socket is bound. 198 * data and the address and port information of the target host as well. 235 * Connects this socket to the specified remote address and port. 239 * @param port 245 connect(InetAddress inetAddr, int port) argument [all...] |
H A D | PlainSocketImpl.java | 78 public PlainSocketImpl(FileDescriptor fd, int localport, InetAddress addr, int port) { argument 82 this.port = port; 105 newImpl.port = peerAddress.getPort(); 129 this.port = remotePort; 149 @Override protected void bind(InetAddress address, int port) throws IOException { argument 150 IoBridge.bind(fd, address, port); 152 if (port != 0) { 153 this.localport = port; 176 * Connects this socket to the specified remote host address/port 426 socksSendRequest(int command, InetAddress address, int port) argument [all...] |
/libcore/luni/src/main/java/java/lang/ |
H A D | SecurityManager.java | 40 public void checkAccept(String host, int port) { } argument 46 public void checkConnect(String host, int port) { } argument 48 public void checkConnect(String host, int port, Object context) { } argument 60 public void checkListen(int port) { } argument
|
/libcore/support/src/test/java/libcore/javax/net/ssl/ |
H A D | TestSSLContext.java | 92 public final int port; field in class:TestSSLContext 106 int port) { 119 this.port = port; 133 * listening provided host and port. 179 int port = serverSocket.getLocalPort(); 188 serverSocket, host, port); 276 public Socket createSocket(String host, int port) 278 return set(sf.createSocket(host, port)); 280 public Socket createSocket(String host, int port, InetAddres 94 TestSSLContext(KeyStore clientKeyStore, char[] clientStorePassword, KeyStore serverKeyStore, char[] serverStorePassword, X509ExtendedKeyManager clientKeyManager, X509ExtendedKeyManager serverKeyManager, X509TrustManager clientTrustManager, X509TrustManager serverTrustManager, SSLContext clientContext, SSLContext serverContext, SSLServerSocket serverSocket, InetAddress host, int port) argument [all...] |
/libcore/luni/src/test/java/tests/api/javax/net/ssl/ |
H A D | SSLEngineTest.java | 58 * SSLEngine object with null host and -1 port 71 * Test for <code>SSLEngine(String host, int port)</code> constructor 75 int port = 1010; 76 SSLEngine e = getEngine(null, port); 78 assertEquals(e.getPeerPort(), port); 86 e = getEngine(null, port); 93 e = getEngine(null, port); 103 * Test for <code>SSLEngine(String host, int port)</code> constructor 108 int port = 8080; 109 SSLEngine e = getEngine(host, port); 1281 getEngine(String host, int port) argument [all...] |
H A D | SSLServerSocketTest.java | 50 public mySSLServerSocket(int port) throws IOException{ argument 51 super(port); 54 public mySSLServerSocket(int port, int backlog) throws IOException{ argument 55 super(port, backlog); 58 public mySSLServerSocket(int port, int backlog, InetAddress address) throws IOException{ argument 59 super(port, backlog, address); 126 * javax.net.ssl.SSLServerSocket#SSLServerSocket(int port) 143 fail("IOException Expected when opening an already opened port"); 149 * javax.net.ssl.SSLServerSocket#SSLServerSocket(int port, int backlog) 171 * javax.net.ssl.SSLServerSocket#SSLServerSocket(int port, in [all...] |
/libcore/luni/src/main/native/ |
H A D | NetworkUtilities.cpp | 31 jobject sockaddrToInetAddress(JNIEnv* env, const sockaddr_storage& ss, jint* port) { argument 46 return sockaddrToInetAddress(env, tmp, port); 75 if (port != NULL) { 76 *port = sin_port; 103 static bool inetAddressToSockaddr(JNIEnv* env, jobject inetAddress, int port, sockaddr_storage& ss, socklen_t& sa_len, bool map) { argument 162 sin6.sin6_port = htons(port); 191 sin.sin_port = htons(port); 199 bool inetAddressToSockaddrVerbatim(JNIEnv* env, jobject inetAddress, int port, sockaddr_storage& ss, socklen_t& sa_len) { argument 200 return inetAddressToSockaddr(env, inetAddress, port, ss, sa_len, false); 203 bool inetAddressToSockaddr(JNIEnv* env, jobject inetAddress, int port, sockaddr_storag argument [all...] |
/libcore/crypto/src/main/java/org/conscrypt/ |
H A D | OpenSSLServerSocketImpl.java | 41 protected OpenSSLServerSocketImpl(int port, SSLParametersImpl sslParameters) argument 43 super(port); 47 protected OpenSSLServerSocketImpl(int port, int backlog, SSLParametersImpl sslParameters) argument 49 super(port, backlog); 53 protected OpenSSLServerSocketImpl(int port, argument 58 super(port, backlog, iAddress);
|
H A D | SSLContextImpl.java | 113 public SSLEngine engineCreateSSLEngine(String host, int port) { argument 119 return new SSLEngineImpl(host, port, p);
|
/libcore/luni/src/test/java/tests/api/javax/net/ |
H A D | ServerSocketFactoryTest.java | 114 public ServerSocket createServerSocket(int port) throws IOException { argument 119 public ServerSocket createServerSocket(int port, int backlog) argument 125 public ServerSocket createServerSocket(int port, int backlog, argument
|
/libcore/support/src/test/java/org/apache/harmony/security/tests/support/ |
H A D | MySSLContextSpi.java | 95 protected SSLEngine engineCreateSSLEngine(String host, int port) { argument 99 return new tmpSSLEngine(host, port); 116 public tmpSSLEngine(String host, int port) { argument 118 tmpPort = port;
|
/libcore/support/src/test/java/org/apache/harmony/xnet/tests/support/ |
H A D | MySSLContextSpi.java | 93 protected SSLEngine engineCreateSSLEngine(String host, int port) { argument 97 return new tmpSSLEngine(host, port); 114 public tmpSSLEngine(String host, int port) { argument 116 tmpPort = port;
|
/libcore/luni/src/test/java/org/apache/harmony/luni/tests/internal/net/www/protocol/http/ |
H A D | HttpURLConnectionTest.java | 59 public int port() { method in class:HttpURLConnectionTest.MockServer 124 // proxy port 126 // server port 174 new URL("http://localhost:" + httpServer.port()).openConnection(); 193 URL url = new URL("http://localhost:" + server.port()); 198 proxy.port()))); 233 URL url = new URL("http://localhost:" + server.port()); 239 new TestProxySelector(server.port(), proxy.port())); 291 new InetSocketAddress("localhost", proxy.port()))); [all...] |
/libcore/support/src/test/java/tests/support/ |
H A D | Support_PortManager.java | 26 * The port manager is supposed to help finding a free 27 * network port on the machine; however, it uses strange 41 int port = ss.getLocalPort(); 44 return port; 94 * Returns a different port number every 6 seconds or so. The port number
|
/libcore/luni/src/main/java/libcore/io/ |
H A D | IoBridge.java | 73 public static void bind(FileDescriptor fd, InetAddress address, int port) throws SocketException { argument 87 Libcore.os.bind(fd, address, port); 95 * Connects socket 'fd' to 'inetAddress' on 'port', with no timeout. The lack of a timeout 98 public static boolean connect(FileDescriptor fd, InetAddress inetAddress, int port) throws SocketException { argument 100 return IoBridge.connect(fd, inetAddress, port, 0); 107 * Connects socket 'fd' to 'inetAddress' on 'port', with a the given 'timeoutMs'. 110 public static boolean connect(FileDescriptor fd, InetAddress inetAddress, int port, int timeoutMs) throws SocketException, SocketTimeoutException { argument 112 return connectErrno(fd, inetAddress, port, timeoutMs); 114 throw new ConnectException(connectDetail(inetAddress, port, timeoutMs, errnoException), errnoException); 124 private static boolean connectErrno(FileDescriptor fd, InetAddress inetAddress, int port, in argument 166 connectDetail(InetAddress inetAddress, int port, int timeoutMs, ErrnoException cause) argument 194 isConnected(FileDescriptor fd, InetAddress inetAddress, int port, int timeoutMs, int remainingTimeoutMs) argument 459 sendto(FileDescriptor fd, byte[] bytes, int byteOffset, int byteCount, int flags, InetAddress inetAddress, int port) argument 473 sendto(FileDescriptor fd, ByteBuffer buffer, int flags, InetAddress inetAddress, int port) argument [all...] |
H A D | BlockGuardOs.java | 83 @Override public void connect(FileDescriptor fd, InetAddress address, int port) throws ErrnoException, SocketException { argument 85 os.connect(fd, address, port); 167 @Override public int sendto(FileDescriptor fd, ByteBuffer buffer, int flags, InetAddress inetAddress, int port) throws ErrnoException, SocketException { argument 169 return os.sendto(fd, buffer, flags, inetAddress, port); 172 @Override public int sendto(FileDescriptor fd, byte[] bytes, int byteOffset, int byteCount, int flags, InetAddress inetAddress, int port) throws ErrnoException, SocketException { argument 177 return os.sendto(fd, bytes, byteOffset, byteCount, flags, inetAddress, port);
|
/libcore/luni/src/main/java/libcore/net/url/ |
H A D | FtpURLConnection.java | 209 int port = url.getPort(); 211 if (port <= 0) { 212 port = FTP_PORT; 219 InetSocketAddress addr = new InetSocketAddress(hostName, port); 234 port(); 307 * host and the port number as the target name and "resolve, connect" as the 317 int port = url.getPort(); 318 if (port <= 0) { 319 port = FTP_PORT; 321 return new SocketPermission(hostName + ":" + port, "connec 394 private void port() throws IOException { method in class:FtpURLConnection [all...] |
/libcore/luni/src/test/java/libcore/java/net/ |
H A D | OldUnixSocketTest.java | 101 // get a free port here 103 int port = ss.getLocalPort(); 106 Socket socket = new Socket("127.0.0.1", port, false);
|
/libcore/luni/src/test/java/libcore/javax/net/ssl/ |
H A D | SSLSocketFactoryTest.java | 70 int port = sa.getPort(); 71 Socket s = new Socket(host, port);
|