PDA

View Full Version : Joining server on network that has Internet Clients in it


raventy
11-01-2002, 04:06 PM
I got another pc on my network and I was wondering if I can make it join my server while my server has clients from the internet in it? Like when I try to join my server through the LAN I get a 1017. I was wondering if its possible to make my pc join through the LAN to my server that has clients fromt he internet on it? Thanks.

Trumpcard
11-02-2002, 12:05 AM
Yea, shouldnt be a problem, but here youre going to run into the NAT problem. EQEmu has a pretty goofy problem when dealing with a server running on your NAT/firewall machine. Do a search on NAT, you should find some solutions. The best solution is a code fix and compile, but theres a hack to change your hosts file on your windows box and giving your machine a dynamic name.

The code fix is alot less annoying, but we can't seem to convince a developer to make the addition in the code to make it work right everytime.

Heres the code snippet to change in console.cpp

address.sin_addr.s_addr = htonl(INADDR_ANY);

and put a // in front of it.

Then below that line paste the lines (without the --snip--):

--snip--
// bind only to the address specified as the world address
hostent* bindaddr = gethostbyname(net.GetWorldAddress());

if (bindaddr != NULL)
{
#ifdef WIN32
memcpy ((char FAR *)&(address.sin_addr), bindaddr->h_addr, bindaddr->h_length);
#else
memcpy ((char*)&(address.sin_addr), bindaddr->h_addr, bindaddr->h_length);
#endif
}
else
{
// could not resolve world address... bind to all interfaces then
cout << "Error: could not resolve world address " << net.GetWorldAddress() << endl;
cout << "Listening on INADDR_ANY" << endl;
address.sin_addr.s_addr = htonl(INADDR_ANY);
}


Thank btuch for that one.

tamarae
11-02-2002, 02:43 AM
hee this sounds familiar.. spent 2 days getting this working with my LAN. But I did get it to work, so it can be done! :D

Agreed.. thanks btuch (and Trumpcard) :)

raventy
11-02-2002, 06:48 AM
OK I tried adding that line of code and compiling but I get errors all over the place, and right now im just using Visual C++ 6 Intro Ed till I get my .net and because its only intro ed it makes this retarted message pop up whenever I execute an .exe saying its the Intro ver. Is thier some other way to do this? or could somebody send me the compiled .exe? I mean its only like 310K compiled. Thanks!

raventy
11-03-2002, 08:40 AM
yay I got it all working now by useing a dns website thing. Thanks for your help.

raventy
11-03-2002, 10:01 AM
lol ok I spoke a little too soon, I mean it "works" but not at good preformance. Like the second pc on my LAN connects through the internet then back to the server pc, which causes it to lag. Is thier a way to make the second pc on my LAN connect through the LAN into the server pc?

Xarslik
11-03-2002, 02:52 PM
http://forums.eqemu.net/showthread.php?s=&threadid=3892&perpage=1&pagenumb er=19