Under what circumstances will you get a connection timed out error when trying to connect?
Printable View
Under what circumstances will you get a connection timed out error when trying to connect?
Winsock?Quote:
Originally Posted by Nove
If there is no server running or the client cant find the server :)
Pino
Ok, say the server is running, what reasons would the client have for not finding it?
There are many including hardware set up, ip address not right port not right, can i see the server listening code and the client connection code? I can see if i can see any problems :)Quote:
Originally Posted by Nove
Pino
Server listening...
VB Code:
Server.Bind txtPort Server.Listen
Client Connecting
VB Code:
Client.Connect "192.168.0.6", txtPort
I've also attached the project if you want to take a look at it.
Its missing the modules,Quote:
Originally Posted by Nove
tcp? this looks a little like UDP to me?
Let me see the modules :)
Pino
Heh, wow I feel dumb, i've updated the .zip, sorry about that :rolleyes:
No probs, I've missed this post, will check it out now :)Quote:
Originally Posted by Nove
Pino
Is that your class module did you write that?
I cant get through all the code and since i am not familiar with that class i cant help much, why dont you write this yourself rather than using that class? if your new to winsock then this isnt a great way to start that class can be very confusing :???:
Pino
No, I didn't write it, it came with a tutorial. It works fine when both client and server are on the same computer but you move one to a different IP and I can't get a connection. As much as I'd like to start out with winsock I can't as i'm on vb learning. If you assume that the code works exactly as the winsock control, is there anything wrong with the code that would mess with a connection? Thanks.
Arr ok I see, because I dont know this class and with work for colege etc piling up I dont have much time to go through it.Quote:
Originally Posted by Nove
Since you have the l;earners edition have you considered looking at the Winsock API?
Have a look at the link below
http://winsockvb.com/index.php?cat_id=4
Pino
If you are on a lan then i can't see what the problem is.. But if your connected to the internet and trying to connect to another computer i don't think thats a valid IP is the working one. If your on a router your IP is hidden. I'm on a wireless router so if i use cmd->ipconfig the internet protocol isn't the real ip.
Try this site. http://www.whatismyip.com/
If your on a proxy that wont work. Another thing that could stop a computer from connecting to you/connecting to another computer is a firewall software.
Sorry, i'm a little confused now. What's the difference between the IP that ipconfig gives me and the IP I get when going to that site? The former allows me to connect when both server and client are on the same machine (as usual) but not when they are on different machines, and I don't seem to get any kind of connection with the latter.
The ip in the ipconfig is the ip of the router. If you notice your cable box is connected to the router and the router is connected to the comp. Well adleast thats my setup. Now when you visit the site i gave you, the packets out of the cable box will be sent with your internet ip in the packet header and as you can see the way the site works it shows your internet ip. Hopefully your not confused now.
Well yes,
Ipconfig will give you the newtowrk address of the computer and the site will give you your internet IP (Which all your computers use to connect to the net)
But I thought you wernt using a router?
So, if I can't get a connection to my internet IP (from that site) what do I do?