DNS lookups?

 
Post new topic   Reply to topic    mudlab.org Forum Index -> Coding
View previous topic :: View next topic  
Author Message
Traithe



Joined: 13 May 2005
Posts: 50

PostPosted: Wed May 18, 2005 9:26 am    Post subject: DNS lookups? Reply with quote

Hey folks -

I was wondering if anyone knew of any decent ways for a MUD server to do DNS resolves on IP addresses. On the one hand, having the server freeze when faced with a broken DNS lookup is quite irritating, but on the other, forking the entire process to check a single IP seems a bit much.

Has anyone tried setting up a perpetually-forked server to handle ALL the lookups? Or, even more preferably, some other elegant alternative that escapes me at the moment?

t.
Back to top
View user's profile Send private message Visit poster's website
Author Message
eiz



Joined: 11 May 2005
Posts: 152
Location: Florida

PostPosted: Wed May 18, 2005 9:32 am    Post subject: Reply with quote

There are two solutions to this problem. The most common in muds is to fork a new process or spawn a new thread which does all DNS resolves, but this has some drawbacks, namely that if one lookup stalls, all further name resolutions will have to wait (unless you use a thread pool). Another option is to use an asynchronous DNS lookup library. There are several of these, for example adns.

Traithe wrote:

Has anyone tried setting up a perpetually-forked server to handle ALL the lookups?


Yes, some servers do this. It's fairly silly for the above reason.
Back to top
View user's profile Send private message Visit poster's website
Author Message
Traithe



Joined: 13 May 2005
Posts: 50

PostPosted: Wed May 18, 2005 9:33 am    Post subject: Reply with quote

Perfect! Thanks. Smile

I imagine that by the time I get done mangling this thing and we get our players abusing it, forking probably wouldn't be a very practical option due to the girth of the server, heh.
Back to top
View user's profile Send private message Visit poster's website
Author Message
Iclisx



Joined: 19 May 2005
Posts: 1

PostPosted: Thu May 19, 2005 7:07 am    Post subject: Reply with quote

If you are using VB\C#\MC++, then there is also the built in DNS functions:
http://msdn2.microsoft.com/library/5yw7xsdh(en-us,vs.80).aspx
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    mudlab.org Forum Index -> Coding All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Powered by phpBB © 2001, 2002 phpBB Group
BBTech Template by © 2003-04 MDesign