src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/Http2Connection.java
equal
deleted
inserted
replaced
425 // S indicates secure "https" |
425 // S indicates secure "https" |
426 // H indicates host (direct) connection |
426 // H indicates host (direct) connection |
427 // P indicates proxy |
427 // P indicates proxy |
428 // Eg: "S:H:foo.com:80" |
428 // Eg: "S:H:foo.com:80" |
429 static String keyString(boolean secure, boolean proxy, String host, int port) { |
429 static String keyString(boolean secure, boolean proxy, String host, int port) { |
|
430 if (secure && port == -1) |
|
431 port = 443; |
|
432 else if (!secure && port == -1) |
|
433 port = 80; |
430 return (secure ? "S:" : "C:") + (proxy ? "P:" : "H:") + host + ":" + port; |
434 return (secure ? "S:" : "C:") + (proxy ? "P:" : "H:") + host + ":" + port; |
431 } |
435 } |
432 |
436 |
433 String key() { |
437 String key() { |
434 return this.key; |
438 return this.key; |
435 } |
439 } |
436 |
440 |
437 void putConnection() { |
441 boolean offerConnection() { |
438 client2.putConnection(this); |
442 return client2.offerConnection(this); |
439 } |
443 } |
440 |
444 |
441 private HttpPublisher publisher() { |
445 private HttpPublisher publisher() { |
442 return connection.publisher(); |
446 return connection.publisher(); |
443 } |
447 } |