//public RSAParameters PublicParameters; /// <summary> /// Konstruktor socketa clienta /// </summary> /// <param name="ip">IPAddress</param> /// <param name="port">Port</param> public ClientSocket(string ip, int port) { IPAddress ipAddress = IPAddress.Parse(ip); IPEndPoint localEndPoint = new IPEndPoint(ipAddress, port); clientSocket = new Socket(ipAddress.AddressFamily, SocketType.Dgram, ProtocolType.Udp); clientSocket.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.ReuseAddress, true); clientSocket.Bind(localEndPoint); sign = new SignProgram(); protocol = new Protocol(); }
/// <summary> /// Konstruktor socketa clienta /// </summary> /// <param name="ip">IPAddress</param> /// <param name="port">Port</param> public ClientSocket(string ip, int port) { IPAddress ipAddress = IPAddress.Parse(ip); IPEndPoint localEndPoint = new IPEndPoint(ipAddress, port); clientSocket = new Socket(ipAddress.AddressFamily, SocketType.Dgram, ProtocolType.Udp); clientSocket.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.ReuseAddress, true); clientSocket.Bind(localEndPoint); //uwierzytelnianie sign = new SignProgram(); //diffle hellman protocol = new Protocol(); //aes aes = new AESProgram(); }