Here I provide the source codes of the examples that I use in my distributed computing course.
Since I also use the same code in my slides, there are some special comments such as //(*@\serverBox{2)}@*)
for formatting in my codes ... you can safely ignore them ^_^