Started adding code for incoming socket connections.