protected override void Process(Connection con) { ConnectionWithMessage aMessageCon = (ConnectionWithMessage)con; con.writer.WriteLine(aMessageCon.message); Console.WriteLine(aMessageCon.message); }
private void WelcomeMessage(Socket client) { ConnectionWithMessage newClient = new ConnectionWithMessage(client); StringBuilder sb = new StringBuilder(); sb.AppendLine("--------------------------------------------------"); sb.AppendLine("WELCOME! TO Dale Salter's Database Server"); sb.AppendLine("--------------------------------------------------"); sb.AppendLine(); sb.AppendLine("To Create:\t c,<Your data>"); sb.AppendLine("To Delete:\t d,<RowId>"); sb.AppendLine("To Select:\t s,<Start Range>-<End Range>"); sb.AppendLine("To Update:\t u,<RowId>:<New Data>"); sb.AppendLine("To Random:\t r,<Records to random>"); sb.AppendLine(); sb.AppendLine(); sb.Append("~> "); newClient.writer.Write(sb.ToString()); newClient.writer.Flush(); }