[Home] [Groups] - Message: [Prev in Group] [Next in Group]
31283: Re: [MUD-Dev] How many UDP sockets to use?
[Full Header] [Plain Text]
From: Michael Montague <mikem@tarix.net>
Newsgroups: nu.kanga.list.mud-dev
Date: Thu, 18 Nov 2004 23:35:59 -0800
References: [1] [2] <-newest
Organization: Kanga.Nu
Jon Mayo wrote:
> For non real-time data I highly recommend you do one TCP socket
> per player. Things like chat must be delivered. Important actions
> that must be delivered should go over TCP as well. And if timing
> is fairly important, tag the TCP packet with a frame number. For
> example, if you use an item, that "use item" action must be
> delivered. Rather than trying to implement a resend protocol over
> UDP, you can tag your TCP-based message with a synchronized
> timestamp. (this can be as simple as 1+last_server_update_number).
You might want to also look into disabling the nagel algorithm and
possibly expanding this to include two TCP sockets per player. You
could send time-sensitive guaranteed-delivery information over the
non-nagel connection and chat or other large packets over the
conventional socket. Before implementing this I would highly
recommend you do some research on the nagel algorithm, what it does,
and why it is enabled by default.
I whole-heartedly agree with not reinventing the networking wheel.
It's always possible that reassembling packets in kernel-space can
be optimized by the OS or driver. (For example the TCP/IP stack and
underlying network hardware could possible accelerate TCP. However
it cannot do this for unknown protocols you implement on top of
UDP.)
_______________________________________________
MUD-Dev mailing list
MUD-Dev@kanga.nu
https://www.kanga.nu/lists/listinfo/mud-dev