diff options
author | marcinzelent <zelent.marcin@gmail.com> | 2018-03-17 17:54:36 +0100 |
---|---|---|
committer | marcinzelent <zelent.marcin@gmail.com> | 2018-03-17 17:54:36 +0100 |
commit | e866abc9e35e62842168d01199e90f2bdfaf774e (patch) | |
tree | 45fcc55f8c90f23c31166c378c6279c95bb591b4 /DistributedPasswordCracker.Server/Models/ClientConnection.cs | |
parent | f68bb1864b40c69d12b44db5aa33125aef39e150 (diff) |
Fixed everything
Diffstat (limited to 'DistributedPasswordCracker.Server/Models/ClientConnection.cs')
-rw-r--r-- | DistributedPasswordCracker.Server/Models/ClientConnection.cs | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/DistributedPasswordCracker.Server/Models/ClientConnection.cs b/DistributedPasswordCracker.Server/Models/ClientConnection.cs deleted file mode 100644 index 4dab2b1..0000000 --- a/DistributedPasswordCracker.Server/Models/ClientConnection.cs +++ /dev/null @@ -1,37 +0,0 @@ -using System.IO; -using System.Net.Sockets; -using System.Threading.Tasks; - -namespace DistributedPasswordCracker.Server.Models -{ - class ClientConnection - { - public TcpClient ConnectionSocket { get; set; } - public string Chunk { get; set; } - public string Pass { get; set; } - - - public ClientConnection(TcpClient connectionSocket, string chunk, string pass) - { - ConnectionSocket = connectionSocket; - Chunk = chunk; - Pass = pass; - } - - public async Task<string> SendToClient() - { - Stream ns = ConnectionSocket.GetStream(); - StreamReader sr = new StreamReader(ns); - StreamWriter sw = new StreamWriter(ns) - { - AutoFlush = true - }; - - sw.WriteLine($"DPCP 1.0\n{Pass}\n{Chunk}\n\n"); - //sw.WriteLine(pass); - //sw.WriteLine(chunk); - - return sr.ReadLine(); - } - } -}
\ No newline at end of file |