public ClientConnection(TcpClient client, Dispatcher dispatcher, EncriptionType encriptionType) { Client = client; Stream = client.GetStream(); Reader = new BinaryReader(new BufferedStream(Stream)); Writer = new BinaryWriter(new BufferedStream(Stream)); Formatter = new BinaryFormatter(); RSA = new RSACryptoServiceProvider(); Row = new TableDataRow(new DataGridViewRow()); Dispatcher = dispatcher; EncriptionType = encriptionType; PrivateKey = RSA.ExportParameters(true); PublicKey = RSA.ExportParameters(false); StartThread(); }
public DataServerToClient(RSAParameters publicKey, EncriptionType encriptionType, byte[] data) { PublicKey = publicKey; EncriptionType = encriptionType; Data = data; }
public ServerCore(Dispatcher dispatcher, ServerForm form, EncriptionType encriptionType) { _dispatcher = dispatcher; _form = form; _encriptionType = encriptionType; }