public void handle(Socket client)
{
try {
NetworkStream netStream = new NetworkStream(client);
StreamReader istream = new StreamReader(netStream);
StreamWriter ostream = new StreamWriter(netStream);
string command = istream.ReadLine();
if (command == "test")
{
string password = istream.ReadLine();
//bool validateRules = dict.validateNumberUppercaseLowercaseSpecialChacacters(password);
bool containsPassword = dict.contains(password);
//ostream.WriteLine(validateRules? "false" : "true");
ostream.WriteLine(containsPassword ? "false" : "true");
ostream.Flush();
}
else
{
ostream.WriteLine("ERROR");
ostream.Flush();
}
} catch (Exception e) {
}
client.Close();
}