-
TCP/IP connections
HI,
I facing a problems like this:
I developed a winsock programming in CF.net vb
1.) If the winsock server ip address is statics ip,it can success to accept the client and send/receive data
2.) But if i change the winsock server ip address to dynamic ip, then it can not work any more, client can not found the winsock server..
All above was using fixed port (2020) and using WIFI access
any help or suggestion about this? Thanks
-
Re: TCP/IP connections
Which language are you using (VB.Net ??)
If you are using .Net, confirm you are using a WINSOCK-Control:
How does your Client get the Server IP, is it hardcoded?
-
Re: TCP/IP connections
Ya, i using WINSOCK control in vb.net
i using web service to define the server ip address. and then client try to connect based by that ip address. Am i right by this way??
-
Re: TCP/IP connections
In VB.Net you should use the .Net tools to create connections (however, since I'm new to Vb.Net I personally find it easier to use Winsock).
What is/ dos this "web service"? Is it run at the Client or Server?
-
Re: TCP/IP connections
ya, i using winsock listener to listen the client request, that is worked if server is statics ip, but when server is running in dynamic ip, then the client can not found the server.
Web service is a hosted, programmable XML Web Service that allows you to integrate IP-based location information. To determine the server ip since the server running in dynamic, the ip will always change.... that is run in my server.
-
Re: TCP/IP connections
Not sure what "web service" you're talking about. You should get a DNS name for that computer so you can refer to it by name and not IP address. The DNS name will point to the IP even when it changes.
The first free DNS service that comes to mind is www.no-ip.com. There are other free ones too.
-
Re: TCP/IP connections
thanks digirev, the solution u suggested can apply in the windows mobile 2005 pocket pc also?
-
Re: TCP/IP connections
It applies to ANY computer - you can't connect to a dynamic DNS unless you know the current one. It has nothing to do with which language, which control or which computer you're using.
If the server has a dynamic address, use a free dynamic dns service, like no-ip or dyndns.