search

Home  >  Q&A  >  body text

java - httpclient多次网络请求可不可以一直都是用同一个端口映射?

PHP中文网PHP中文网2768 days ago355

reply all(3)I'll reply

  • PHPz

    PHPz2017-04-17 16:37:51

    See if this article is helpful to you.

    HttpClient4.3 Tutorial Chapter 2 Connection Management

    It’s best to read the English description on the official website Chapter 2. Connection management

    Someone in OSChina raised a similar question about httpClient releasing links

    Then, this article is about httpClient httpclient before 4.x, how to maintain the session

    reply
    0
  • 大家讲道理

    大家讲道理2017-04-17 16:37:51

    Using a long connection when connecting can 有概率实现this requirement.
    The use of ports in the HTTP protocol should be transparent to you. You cannot and do not need to know which specific port is actually used by the HTTP protocol provider to connect. If you want to achieve this requirement, you should rewrite HTTP yourself and never abandon these HTTP packets.

    reply
    0
  • 迷茫

    迷茫2017-04-17 16:37:51

    Use HttpClientBuilder

    reply
    0
  • Cancelreply