Socket communication refined