minor changes to socket connection
input integrated with game loop