Player Command Round Trip

Player Command Round Trip A sequence diagram generated by Archify. wait(fds, nearest deadline) command bytes readable ProtocolInput() text line queued command_interpreter() command triggers not handled cmd_info[cmd] handler publish committed fact subscribers return send_to_char() / act() ProtocolOutput() output + prompt Wait Decode Dispatch Publish Respond MUD Client · telnet · Sequence participant MUD Client telnet I/O Reactor · libevent/select · Sequence participant I/O Reactor libevent/select comm.c · game_loop() · Sequence participant comm.c game_loop() protocol.c · telnet options · Sequence participant protocol.c telnet options Interpreter · interpreter.c · Sequence participant Interpreter interpreter.c DG Triggers · dg_triggers.c · Sequence participant DG Triggers dg_triggers.c ACMD Handler · act.*.c · Sequence participant ACMD Handler act.*.c Domain Events · typed facts · Sequence participant Domain Events typed facts Legend request return async trace default message

One loop iteration

  • • Reads every ready descriptor first
  • • One queued command per descriptor
  • • Output flushes after all commands

Gates before the handler

  • • WAIT_STATE lag skips the descriptor
  • • DG command triggers see it first
  • • Position and special-proc checks

Evidence

  • • src/core/comm.c: game_loop() 1216
  • • src/core/interpreter.c: line 6603
  • • src/net/protocol.c: lines 792, 1006