Socket communication in background.