update copyrights and other minor stuff to deliantra
- clean up message system, combine all boxes into one. - suppress too long messages (we need a more robust solution to this problem). - get rid of INS_MAP_LOAD, leading to slightly cleaner/faster code and certainly one special case less. - insert objects manually at load time, this is both faster and also more correct, as loading a map is never supposed to trigger anything (and also for symmetry to the save code).
first, untested, try at spicing up the message system
replace MAXSOCKBUF by MAXSOCKBUF-1, the real socket buffer size, and adjust it to 10239, the actual maximum gcfclient supports
implement the most elaborate rate limit system to date, from the errors before: - output-rate is now an upper bound only. its purpose is to give the user some control over bandwith use. it should be set too high rather than too low. - the server will (on linux only, or systems that support tcpi), guess how much the kernel is willing to send without delay (this is imperfect as we do not know the remote receive window, but we assume its "large enough"). - we accuretyl measure mss and ensure that preferably mss-sized packets leave the server, by sending less in some cases and more in others to reacht eh desired bandwidth goal (e.g. 15000 == http://ue.tst.eu/545350740128735b13aaf541c88bfaf2.txt) the net effect is that the server will never send (much) more data than the kernel thinks the network is able to handle. that is, when the connection was idle for a time and the congestion window is small, we will only start sending small amounts of data, prompting the kernel to accuratly model the bandwidth. in essence, this creates a tcp stream that never has more data buffered than neccessary for in-flight data, ensuring that we can get low-latency map updates through to the client whole using all excess bandwidth the network can handle. I mostly tested with netem, e.g. ifconfig lo mtu 1500 tc qdisc change dev lo root netem delay 190ms 10ms drop 0.1 gave me roughtly 20kb/s throughput even though output-rate was 100kb/s, without stalling the conenction even when downloading backgorund music and other large chunks of data.
- remote code was not making copies of strings it modified - implemented two ew flags: NDI_REPLY and NDI_DEF. - went over a lot of chat-related code and converted to send_msg, NDI_REPLY and NDI_DEF.
- upgrade crossfire trt to the GPL version 3 (hopefully correctly). - add a single file covered by the GNU Affero General Public License (which is not yet released, so I used the current draft, which is legally a bit wavy, but its likely better than nothing as it expresses direct intent by the authors, and we can upgrade as soon as it has been released). * this should ensure availability of source code for the server at least and hopefully also archetypes and maps even when modified versions are not being distributed, in accordance of section 13 of the agplv3.
- introduce global NOW variable storing current tick time. - force some packet send at least every 2 seconds, forcing an ack reply. - timeout connections on ack delay exclusively, by default disconnect after 8 seconds (allowing for at least 5.5s of network hiccups). (linux only, should port to bsds). - nuke ericserver stats code. - reduce number of syscalls (less gettimeofday, only get tcp_info about once/second). - get rid of coroapi.time () in favour of now ().
- update copyrights in .h files, where applicable - rename preprocess to genkeywords
implement ex command support to quickly retrieve item descriptions
- implement smoothing in the fxix (or better: fxixsx) protocol. - this *enforces* that smoothing is *per face* and not *per archetype*. - no extra bandwidth is needed for map information (unlike in the crossfire 1.x protocol, where smoothlevels are per-mapspace and take up a lot of bandwidth). - no extra storage is required on the client-side (although smoothing for cached map data is then only available for tiles that have been seen). - temporarily supply empty_S.x11 smoothfaces again, as this hack is required because there is no way to specify a smoothlevel but no smoothface otherwise. this should be optimised away at a future point, but this will break gcfclient (but disabling smoothing for that might be a good compromise).
add untested ber integer encoding function
comments
added some copyrights
- misc stuff - implement $client->query
some source simplification
- socket i/o is completely asynchronous now - some command sare handled immediately - others (most palying related commands) are queued for later (as of now synchronous) processing - specifying a max queue length (in seconds) is possible, but disabled - also add some syntax sugar for network code
I goofed.
more slight copyright adjustments
This form allows you to request diffs between any two revisions of this file. For each of the two "sides" of the diff, select a symbolic revision name using the selection box, or choose 'Use Text Field' and enter a numeric revision.