How to treat data from wifi like int, not string

Hello everybody. I need to receive a packet via wifi STA ESP8266, but I need to treat it as int because I need to treat the packet byte by byte. As a string it doesn't work, because I can receive any data, such as the CR character (0x0d) and it messes up when it's a string. I did a test sketch, if it works for me it's done. I need to receive the package and generate its echo. The big question in this sketch is on the given dado = client.read(); that doesn't work.

#include <lwip/priv/tcp_priv.h>

void tcpCleanup()
{
  while (tcp_tw_pcbs != NULL)
  {
    tcp_abort(tcp_tw_pcbs);
  }
}

#include <ESP8266WiFi.h>

const char* ssid = "2.4Gviviane";
const char* password = "24151965";
int dado[20]={0};
WiFiServer server(80);

void setup() {
  Serial.begin(74880);
  IPAddress staticIP(192, 168, 0, 191);
  IPAddress gateway(192, 168, 0, 1);
  IPAddress subnet(255, 255, 255, 0);

  WiFi.config(staticIP, gateway, subnet);
  WiFi.begin(ssid, password);
 
   while (WiFi.status() != WL_CONNECTED) {
    delay(500);   
  } 
  server.begin();   
  Serial.println("Conected");
  Serial.println(WiFi.localIP());

    tcpCleanup();    

}

void loop() {
  
  // put your main code here, to run repeatedly:

  WiFiClient client = server.available();
  if (!client) {
    return;
  }
  
  while (!client.available()) {
    delay(1);  
  }

 // String dado = client.readStringUntil('\r');  
  dado = client.read();  
  //req.toCharArray(dado,17);
  client.flush();
//  Serial.println(req);

  Serial.print(dado);
 
    for (char i=0; i<17;i++)
    {
      client.write(dado[i]);
    }
  
 
}

dado appears to be an array - didn't the compiler complain?

Hi @mario06763
This topic is the same as?

Don't duplicate our efforts.

RV mineirin