Help With Atelnet Server

Hello Arduino Community
I Have a Arduino Ethernet Telnet Server sketch
(The Telnet Server sketch is included )

The Telnet Server is base on the excellent work of David A. Mellis & Tom Igoe
The Telnet Will controle a Ludlum 2000 Radiation Rate Meter
I start to write the required function and code to controle the Ludlum 2000 unit.

The Telnet Server sketch include the required function and code to controle the Ludlum 2000 unit.
(I just Start to Work on the code and such)

my question is:
I want to be able to enter a scan time in the telnet server.
The program pause the end user enter the required scan time as an: Int
Then the Ludlum 2000 Radiation Rate Meter count the number of radiation count in the time interval.

I try several function for this to work but it dosent work as intended.

else if (cmd.equals("SC")) { // Set the Scaler Count Time. The Count Time Value is entered in the telnet Server. <The value is stored in a variable:  timecount
    
server.println("SC    : Set Count Time"); //Print the Following on the Telnet Server "SC    : Set Count Time"
server.println("Input Count Time");       //Print the Following on the Telnet Server "Input Count Time"

        if (client.available() > 0) {
                 // read the incoming byte:
                 timecount = client.read();

                 // say what you got:
                 
                 //Serial.println(incomingByte, DEC);
                 
             
    server.print ("Count Time"); //Print the Following on the Telnet Server "Count Time"
    server.println (timecount, DEC);  //Print the Following on the Telnet Server: The Value of int  (timecount)
    Serial.println (timecount, DEC); //Print the Following on the TSerial Console: The Value of int  (timecount)
         }




// Set the Scaler Count Time. The Count Time Value is entered in the telnet Client. the value is stored in a variable.

and client.parseint()

thank you for your help

sketch_dec18a.ino (6.67 KB)