From cce063b0cdbe92d0425bca780f2f791ac9772edd Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Sun, 19 Jan 2014 18:37:20 +0100 Subject: [PATCH] Added graph of SocketThreads state transitions. This graph has been used for #560. --- docs/.gitignore | 7 ++++ docs/SocketThreads states.gv | 77 ++++++++++++++++++++++++++++++++++++ docs/_files.txt | 21 ++++++++-- 3 files changed, 101 insertions(+), 4 deletions(-) create mode 100644 docs/.gitignore create mode 100644 docs/SocketThreads states.gv diff --git a/docs/.gitignore b/docs/.gitignore new file mode 100644 index 000000000..f6caf1c11 --- /dev/null +++ b/docs/.gitignore @@ -0,0 +1,7 @@ +# PNG file with no filename is created by the GraphViz's GVEdit when displaying .gv files +.png + +# The PNG files generated from their .gv sources by GraphViz: +API class inheritance - blockentities.png +API class inheritance - entities.png +SocketThreads states.png diff --git a/docs/SocketThreads states.gv b/docs/SocketThreads states.gv new file mode 100644 index 000000000..5afaa5370 --- /dev/null +++ b/docs/SocketThreads states.gv @@ -0,0 +1,77 @@ +digraph +{ + node + [ + shape="box" + ] + + edge + [ + d + ] + + // Forward-declarations of nodes (so that they are laid out in a specific order: + ssNormal + ssWritingRestOut + ssShuttingDown + ssShuttingDown2 + + // Nodes with special labels / shapes: + ForceClose + [ + label="Force close" + shape="ellipse" + ] + X + [ + label="Socket closed" + shape="ellipse" + ] + + // Edges: + ssNormal -> ssWritingRestOut + [ + label="cSocketThreads::RemoveClient()" + ] + ssWritingRestOut -> ssShuttingDown + [ + label="All outgoing data written" + ] + ssShuttingDown -> ssShuttingDown2 + [ + label="One thread loop" + ] + ssShuttingDown2 -> ForceClose + [ + label="One thread loop" + ] + ssNormal -> ssRemoteClosed + [ + label="Remote closed" + color="red" + fontcolor="red" + ] + ssWritingRestOut -> X + [ + label="Remote closed" + color="red" + fontcolor="red" + ] + ssShuttingDown -> X + [ + label="Remote closed" + color="red" + fontcolor="red" + ] + ssShuttingDown2 -> X + [ + label="Remote closed" + color="red" + fontcolor="red" + ] + ssRemoteClosed -> X + [ + label="cSocketThreads::RemoveClient()" + ] + ForceClose -> X +} diff --git a/docs/_files.txt b/docs/_files.txt index a8e204334..5147c62c8 100644 --- a/docs/_files.txt +++ b/docs/_files.txt @@ -1,7 +1,20 @@ Contents of this folder: -API class inheritance - blockentities.gv - a GraphViz file to visualise inheritance in the API classes in the Wiki for the cBlockEntity class' descendants -API class inheritance - entities.gv - a GraphViz file to visualise inheritance in the API classes in the Wiki for the cEntity class' descendants -Object ownership.gv - a GraphViz file to visualise ownership relations in the MCServer code architecture -Springs.ods - a spreadsheet with collected statistics about the occurrence of lava / water springs based on height. +API class inheritance - blockentities.gv + - a GraphViz file to visualise inheritance in the API classes in the Wiki for the cBlockEntity class' descendants + +API class inheritance - entities.gv + - a GraphViz file to visualise inheritance in the API classes in the Wiki for the cEntity class' descendants + +Login Sequence.txt + - Annotated log of packets exchanged between the client and server for login; 1.6.2 protocol + +Object ownership.gv + - a GraphViz file to visualise ownership relations in the MCServer code architecture + +SocketThreads states.gv + - a GraphViz file documenting the states for individual sockets in cSocketThreads, and transitions between them + +Springs.ods + - a spreadsheet with collected statistics about the occurrence of lava / water springs based on height.