The person who has the "server" (the one your trying to connect to) must have a legal internet address, not behind a NAT device.
Your friend is probably behind a NAT router, like the famous Linksys router. He will have to plug his machine directly in to the modem (whether dsl or cable, doesn''t matter). Then try it.
WinSock and NATs
quote:
The person who has the "server" (the one your trying to connect to) must have a legal internet address, not behind a NAT device.
I''m the server. I call listen(). I''m plugged directly into the modem.
I''m just going to see what the error message is, i''ll post back in 5 mins...
Steve
Steve
DirectX Programmer
Soon to be the new Bill Gates
Ok then. Are you imbeddding the "client" address in your packet or are you getting it from the socket description? You must do a recvfrom and read the address out of the packet information.
The error is: WSAETIMEDOUT.
Ah... I''m just getting it from the socket description...
Right, i''ll give that a shot. I don''t need to connect the socket, right? Just call recvfrom()?
Cheers, Steve
Steve
DirectX Programmer
Soon to be the new Bill Gates
Ah... I''m just getting it from the socket description...
Right, i''ll give that a shot. I don''t need to connect the socket, right? Just call recvfrom()?
Cheers, Steve
Steve
DirectX Programmer
Soon to be the new Bill Gates
don''t listen to me, I don''t know what I''m talking about. Forget that last post, it''s for UDP stuff, not TCP unless your doing your own handshaking which I doubt.
Never thought of that: Port 6969
I know theres certain ones your supposed to use, but this is just a test.
What ones should you use? I read that games like quake use 27000+.
(I tried recvfrom() anyway BTW, and it just didn''t fill in the descriptor i passed (yep, i did set ''len'' correctly - i missed that a while ago. Spent ages trying to fix it )
Steve
I know theres certain ones your supposed to use, but this is just a test.
What ones should you use? I read that games like quake use 27000+.
(I tried recvfrom() anyway BTW, and it just didn''t fill in the descriptor i passed (yep, i did set ''len'' correctly - i missed that a while ago. Spent ages trying to fix it )
Steve
It should be open already, but make sure your friends router will pass that port. Some routers are firewalls as well and block all ports except the ones that you want open.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement