Why when i send message from client to server it's delay 5 sec.

When send message for OFF/ON my led it’s delay 5 sec by use ESP8266, uartWIFI libraries and UNO.

This is my code.

#define SSID       "******"
#define PASSWORD   "*********"


#include "uartWIFI.h"
#include <SoftwareSerial.h>

WIFI wifi;

extern int chlID;

int led = 12;

void setup()
{
	pinMode(led, OUTPUT);

	digitalWrite(led, 0);

	wifi.begin();

	if (wifi.Initialize(STA, SSID, PASSWORD)) Serial.println("Succecd"); else Serial.println("Init error");

	wifi.confMux(1);

	delay(200);
	if (wifi.confServer(1, 8080)) {
		digitalWrite(led, 1);
		delay(2000);
		digitalWrite(led, 0);
	}

	wifi.newMux(UDP, "192.168.1.173", 5033);
	
	Serial.println(wifi.showIP());
}

void loop()
{
	char buf[100];
	int iLen = wifi.ReceiveMessage(buf);
	if (iLen > 0)
	{
		if (strcmp(buf, "HELLO") == 0)
		{
			if (digitalRead(led) == 0) {
				digitalWrite(led, 1);
				wifi.Send(chlID, "LED ON ");
			}
			else {
				digitalWrite(led, 0);
				wifi.Send(chlID, "LED OFF");
			}
		}
	}
}

Please post a link (using the chain links icon on the forum toolbar to make it clickable) to where you downloaded the uartWIFI library from. Or if you installed it using Library Manger (Sketch > Include Library > Manage Libraries in the Arduino IDE or Libraries > Library Manager in the Arduino Web Editor) then say so and state the full name of the library.

This is uartWIFI libraries