TCP Server in Java

As a reference for Eugene's implementation in Python.