socket learning on C