|
-
November 9th, 2008, 01:34 AM
#1
bind() binds server socket with local IPv6/Port....How Can I Make It bind() on IPv4?
I got a weird problem. I coded a server. Works good, but it only binds the port to the local IPv6 .... So when the client enters the target external IP (Usually IPv4)/port. Client will be able to connect to the listening port that is through IPv4 only...
For example, i made my server binds on port 4443 on the local machine...
I check netstat -an, i get
Proto Local Address Foreign Address State
TCP 0.0.0.0:135 0.0.0.0:0 LISTENING
TCP 0.0.0.0:445 0.0.0.0:0 LISTENING
TCP 0.0.0.0:1025 0.0.0.0:0 LISTENING
TCP [::]:135 [::]:0 LISTENING
TCP [::]:445 [::]:0 LISTENING
TCP [::]:1025 [::]:0 LISTENING
TCP [::]:4443 [::]:0 LISTENING
ports 135, 445, and 1025 will respond to client who connects to it through IPv4 or IPv6. 4443 will only respond to client who connects to it through IPv6. So for a client to connect on the server port 4443, it (client) must enter IPv6 for the target so 4443 can respond. Otherwise, connection will fail as you see that 4443 is not included among IPv4! I hope you get my point.....Weird problem! ..... On linux, everything works fine, but on Vista things did not go as it should be....
I hope somebody can provide some help...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|