Re: basic socket question



1) Assuming you mean using the same local IP:port pair,
check out the SO_REUSEADDR socket option and bind.

2) Not sure what you are asking here. Seems the same
question as in 1... If you are asking whether the NAT
router will use the same public IP:port pair for the
second connection, the answer is - it depends on the
router.

--
=====================================
Alexander Nickolov
Microsoft MVP [VC], MCSD
email: agnickolov@xxxxxxxx
MVP VC FAQ: http://www.mvps.org/vcfaq
=====================================

"Bidu" <bidu@xxxxxxxxxx> wrote in message
news:uVZ76GSHHHA.1064@xxxxxxxxxxxxxxxxxxxxxxx
Sorry if my question is not so sophisticated, but so is my knowledge in
networking...
1. Suppose one thread in my win32 application communicate with some other
party across the internet in ip1:port1 and I want some other thread to
communicate with another party(another ip address) in the same ip:port
(ip1:port1). Is that possible?
2. My UPNP nat router informs my application about the outer IP:PORT that
are opened for my application. Can my application use the corresponding
inner IP:PORT to communicate with another PC on the internet?

Regards

Bidu




.



Relevant Pages

  • networking (home)
    ... i have two computers both connected to a router by cable. ... access the internet fine but i can not get them to communicate with ...
    (microsoft.public.windowsxp.network_web)
  • Re: Nat router timeout
    ... The TCP FIN packet would tell the NAT router to drop its ... Microsoft MVP, MCSD ... router from the internal LAN network, to the Internet network, and then ...
    (microsoft.public.win32.programmer.networks)
  • Re: Internet Access disappeared overnight on SBS2003
    ... Your laptop situation makes me think the router and other to do with the ... Your ability to communicate between the ... server and the workstations makes me think the server NIC is OK. ... Internet access is unavailable now. ...
    (microsoft.public.windows.server.sbs)
  • Re: Routing IP from different subnet
    ... No router between subnet. ... Have 1 router used for internet, is it ok to used for ip ... routing in subnets? ... Microsoft MVP - Windows Security ...
    (microsoft.public.windows.server.general)
  • Re: Urgent! New router and big disaster
    ... The SBS DNS server, running on ... its IP it means that your problem is now DNS. ... forward ports to it reliably in the router. ... I should have been more clear about internet connection.. ...
    (microsoft.public.windows.server.sbs)