Coded all CSocket functions