private void statusUtilities()
{
string s;
myclient = new TcpClient(host, port);
//get a Network stream from the server
networkStream = myclient.GetStream();
streamReader = new StreamReader(networkStream);
streamWriter = new StreamWriter(networkStream);
streamWriter.WriteLine("status,utilities," + passkey + "");
label6.Text = "Sending Request";
streamWriter.Flush();
s = streamReader.ReadLine();
streamReader.Close();
streamWriter.Close();
networkStream.Close();
if (s == "success")
{
label4.ForeColor = Color.Lime;
label4.Text = "ONLINE";
label6.Text = "Request Completed";
}
if (s == "fail")
{
label4.ForeColor = Color.Red;
label4.Text = "OFFLINE";
label6.Text = "Request Completed";
}
}