socket code include tcp & udp