I have Linux server with one physical interface eth0
and 3 virtuals eth1, eth2, eth3
. Server has 4 IP addresses, it is necessary to use a lot IP ports (more than 100k). Server has bond0
interface with 4 addresses, for example .1
, .2
, .3
and .4
. My application based on ACE v5.5. To open an local 1023
port I use ACE_SOCK_Dgram
class with ctor argument ACE_Addr = ACE_INET_Addr("0.0.0.0:1023")
. It works. How to open 1023
on another local IP?
Thanks.
I found the solution. Using ACE_INET_Addr("xxx1:1023")
, ACE_INET_Addr("xxx2:1023")
, ACE_INET_Addr("xxx2:1024")
, etc in ACE_SOCK_Dgram
ctor param provide your application to use different IP addresses and different ports. You can manage port and address as you like.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.