多网卡多ip下如何指定某个ip发送http请求?
Jun 06, 2016 pm 08:34 PM
RT
假设服务器上有2个网卡,每个网卡都绑定一个可以访问远端http服务的ip地址。
现在,如果在该服务器上跑一个web服务,如何让该web服务使用指定的某个ip地址来向目标http服务发送请求呢?
回复内容:
RT
假设服务器上有2个网卡,每个网卡都绑定一个可以访问远端http服务的ip地址。
现在,如果在该服务器上跑一个web服务,如何让该web服务使用指定的某个ip地址来向目标http服务发送请求呢?
直接阅读Socket 的 JavaDoc
bind 方法。

Hot Article

Hot tools Tags

Hot Article

Hot Article Tags

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

PHP 8.4 Installation and Upgrade guide for Ubuntu and Debian

How To Set Up Visual Studio Code (VS Code) for PHP Development

How do you parse and process HTML/XML in PHP?

Break or return from Java 8 stream forEach?

PHP Program to Count Vowels in a String

Java Made Simple: A Beginner's Guide to Programming Power

Create the Future: Java Programming for Absolute Beginners

Java Program to Find the Volume of Capsule
