add shout and suicide to the list of immediate commands
do away with silly command process idle watcher, we process most commands in the mainloop anyways, so its only overhead
- 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).
be proactive
first round of infobox and c++-level channels
big semantic change - old server and crossfire did update/draw maps check for player commands, move players and monsters flush sockets - new server does check for player commands, move players and monsters update/draw maps flush sockets I have zero idea why the old code didn't do it this way. the net effect is that there is a guarenteed delay of one tick between an issued command and the player seeing its execution. The same for monster movements. That is, the new ordering reduces "lag" by a constant 120ms, which is immense, and can be felt immediately. This is a change I wanted to do for a long time. Apart from that, the tcp send code has been simplified and underwent some further tuning, leading to an even more accurate congestion management.
fix off-by-one bug in checking for valid header sizes, actually a crossfire relict. consider it a unit test that had a bug...
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.
allow perl access to the full tcpi structure. do some elaborate congestion control (very experimental, but better than the old way)
allow perl access to the full tcpi structure. do some elaborate congestion control (very experimental, but better than the old way)
try a very simple method of failsafe-bandweidthing by not sending any data when the socket buffer could not be drained in the last tick
- 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.
first rough cut of msg rewriting, introducing cfpod, a haxored pod variant for crossfire messgaes. where will it end?
only test for timeout and send pseudo-pings when player is active
update mss, if possible
use configure to check for tcp_info
*** empty log message ***
- 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 socket/*.C
new speed management: - weapon speed and object speed is now completekly decoupled for players. - both can be used at the same time, or indeepndent, when running or firing. - still only one command per object speed can be issued.
- implement a rudimentary framework for a "msg" command that replaces drawinfo and drawextinfo and allows for simpler usage in simple cases and extensibility for the less complex uses. - moved the character race choosing logic into perl, making use of the new msg command if the client supports it.
implement ex command support to quickly retrieve item descriptions
- fix ber encoding - reduce image checksum length to 6 bytes (from 16) - implement fx packet, which reduces face overhead to amortised 10/12 bytes per face instead of 21/32 bytes and allows an unlimited number of faces instead of 2**16.
add untested ber integer encoding function
- make face caching mandatory, and pester users to enable it - implement rate-limiting, for images only right now - implement and document output-rate command to set rate limit. - default 1mbit.
- rewrote smooth face handling, as a side-effect, smoothing seems to work again and smooth faces can be reloaded. - the server now sends the full animation for an object the first time it is seen, this uses slightly more bandwidth initially, but avoids the flickering for objects change their face later.
nano-cleanups
make a horrendous hack to enable say and chat to be executed almost anytime
comments
- fix crash bug - better fork & abort (untested)
added some copyrights
- made state a per-client variable (that does not magically make state a per-client thing!) - rename player->socket to player->ns. its not a good name for "client", but it is an historical artifact, and better than "socket".
- made client a first-class crossfire-perl object (its attachable), but perl support is missing. - added some client events - fixed reply not working after logout
some source simplification
- separate all comamnds into immediate/socket-level and queued/player-level - clean up player command handling, handle up to 8 commands/tick
re-enable async command execution
- remove no_shout - serialise command execution somewhat again :( - avoid exceptions
- 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
the rename for sanity campaign hits you died - renamed stuff - partially updated copyrights - some cleanups
- make client_socket accessible to perl - on linux, record rtt and rttvar - who shows rtt/rttvar
- write() is now independent of server ticks and will be done immediately - get rid of CORK hack, it is no longer necessary
- implement c++ interface to Event->io watchers - cut number of write()'s the server does in half
- remove some old socket mode cruft - preliminarily added attachable client_socket interface to perl (untested but also unreachable from perl code atm)
- rewrote most of the socket loop code - moved connection accept into tcp.ext - no evil socket copying anymore, needs more cleanups
moar\! rewrite\!
rewrite phase one finished
moar rewrite
(intermediate check-in for recoverability)
- further cleanup and rewrite - fix a potential crash in "lock" and "mark" packets
continued simplifying network code, partially removed support for sc protocol 1026
started simplifying network code
started simplifying network code
removed #ifn?def WIN32 from all files
double once more - stopid memory management does not scale
indent
indent
remove compression support, intiialise perl earlier etc. etc.
expand initial tabs to spaces
support health stats in an extensible way in map1
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.