You are not logged in.
Pages: 1
What do you mean exactly by "reuse port"? Do you mean be able to bind() to a port which still has old lingering TIME_WAITs on it? If so, set the SO_REUSEADDR sockopt... If you're looking for a SO_REUSEPORT-style sharing of port#'s between multiple processes, I don't think Linux supports it... (And, it's not generally a sane idea either...)
Offline
Offline
I mean is, I have a linux server running with httpd service iptables only allow open port 80, so, I want my program and the httpd 80 ports coexistence, shared this port, and is the state of TCP connections, only one network interface eth0.
port 80,listen httpd and my program
Offline
No, you can't do that... It doesn't really make any sense if you think about what it entails... How on Earth would you distinguish traffic destined for your program vs. that destined for httpd? That's what separate port numbers are for!
Why can't you just change the iptables rules to allow some other port to receive traffic as well?
Or, write your server as some kind of web-based service, so that you can actually reach it through httpd...
Offline
Pages: 1