comment "while (!cres.IsCompleted)" in receive function