Click here to Skip to main content
15,881,803 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hai All,
I am developing VB Application in Visual Studio 2010. In my Application i implement Winsock ... Now i need to assign Dynamic Port to that winsock How....?
Plzzz Help mee.........
Thanks in ADV....:-)
Posted

1 solution

In TCP/IP you typically have a static or dynamic IP address but you need to know the port number... so what do you mean by dynamic port?
 
Share this answer
 
Comments
Himachandra 8-Feb-12 8:13am    
Localhost having static port number.... But i need to fetch the data from Dynamic port address
Jonathan [Darka] 8-Feb-12 8:39am    
Are you writing the client or the server?
Himachandra 8-Feb-12 8:40am    
Server
Jonathan [Darka] 8-Feb-12 8:52am    
In which case you need to use WinSock to bind to the port, if you specify zero as the port number then WinSock will automatically assign a port number to you (dynamically), the WinSock connection that you bind on will then receive the data once a client connects to it.

Sorry, but don't know the VB syntax, but you should be able to look that up.

If your code isn't working, then post a SMALL segment of it (the WinSock bit) then someone might be able to help.
Himachandra 9-Feb-12 7:48am    
Thanks a lot...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900