WinSock and NATs

Started by
20 comments, last by Evil Bill 21 years, 8 months ago
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.
Stephen ManchesterSenior Technical LeadVirtual Media Vision, Inc.stephen@virtualmediavision.com(310) 930-7349
Advertisement
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
Member of the Unban Mindwipe Society (UMWS)
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.
Stephen ManchesterSenior Technical LeadVirtual Media Vision, Inc.stephen@virtualmediavision.com(310) 930-7349
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
Member of the Unban Mindwipe Society (UMWS)
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.
Stephen ManchesterSenior Technical LeadVirtual Media Vision, Inc.stephen@virtualmediavision.com(310) 930-7349
Lol, ok.
Member of the Unban Mindwipe Society (UMWS)
What port are you trying to connect to?
Stephen ManchesterSenior Technical LeadVirtual Media Vision, Inc.stephen@virtualmediavision.com(310) 930-7349
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
Member of the Unban Mindwipe Society (UMWS)
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.
Stephen ManchesterSenior Technical LeadVirtual Media Vision, Inc.stephen@virtualmediavision.com(310) 930-7349
He says he can''t find out till tomorrow
Ah well, i''ll see what i can come up with...

Thanks for the help, Steve

Steve
DirectX Programmer
Soon to be the new Bill Gates
Member of the Unban Mindwipe Society (UMWS)

This topic is closed to new replies.

Advertisement