Added tcp server and ablity to receive events via tcp connection.