# winsock and redirecting

This topic is 4932 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

i have a dynamic ip and i dont no how to use winsock to connect to a redirector like no-ip.com. I have tried just typin the host name in the remosthost place but it doesnt work. and i have clicked on the ip and port in no-ip.com to test to make sure it was the rigth stuff and my server got the message. any help would be great thx jake

##### Share on other sites
webpage redirector or DNS redirector?

dns redirecting

##### Share on other sites
Then all you have to do is use winsock and a DNS lookup.. let's see you are jake.noip.com ... then you just connect to jake.noip.com and it does it for you... I could be mistaken, but I'm pretty sure this is how you do it. Others may be able to help better than I.

~zix~

##### Share on other sites
welli have tried doing that.

    stkClient.RemoteHost = "gneteast.servegame.com"    stkClient.RemotePort = "80"

i got that for setting the host but it doesnt work. I have tried entering no port changing it to commonly used ones, and the one my server monitors. But it doesnt work. When i try and connect with that i get connecting... the server offline (which is supposed to happen when i turn off my server). Then after it fails i usually tell it to connect again ( i tries and connects a couple times then tells the user it cant connect). But then it just says Connecting again for a long time. And never connects.

##### Share on other sites
If you "telnet" to the same location, does that work?

C:\> telnet gneteast.servegame.com 80

If that doesn't actually connect, then the problem is in your DNS set-up, or the actual server response code; not in your connection code. Possibly, but not likely, in your firewall.

You can also try ping to that host from the command line, to see if it resolves at all.

##### Share on other sites
i did all those things u said and they seemed to work. I was able to ping gneteast.servegame.com, and i think i connected using the telnet thing (when i typed it in it went to a blank screen til i typed soekthing then it went weird).
it could be soething todo with me tho. I am using vb for this and when i connect nothing happens on the server under the ConnectingRequest thing. Also at no-ip.com i can test to see if the redirect is working as well, and it does.

##### Share on other sites
Can you connect to a known good server from your own code? Try www.cisco.com port 80 or something.

##### Share on other sites
well when i try and connect to that site it doesnt work so good. Right after i connect the server state is 4 ( resolvinghost) i dont no wat that means. So after like 3 min its state goes to 7 which could be connected or outofmemory. I would asume that it is out of memory for some reason cause when i try and send some data it gives me and error. so i try adn close it and then it just crashes and i get an error.

##### Share on other sites
VB, using the OCX, is simply
socket.remotehost="gneteast.servegame.com"
socket.remoteport=80
socket.connect

forgetting the connect call?? Or maybe a proxy? although I doubt it. If telnet can do it i doubt you would have a problem programming it. Using the TCP protocol, right? That's all I can think of, if your still having problems show us some more code.

~zix~

1. 1
2. 2
Rutin
22
3. 3
4. 4
JoeJ
17
5. 5

• 14
• 30
• 13
• 11
• 11
• ### Forum Statistics

• Total Topics
631774
• Total Posts
3002297
×