private void CreateClientSocket() { // Common initialization code. // // IPv6 Changes: Use the AddressFamily of this class rather than hardcode. _clientSocket = new Socket(_family, SocketType.Dgram, ProtocolType.Udp); } }