Communication between two arduino devices ESP8266

I have two ESP8266 devices to be communicated server-client udp or http socket in APmode, the devices not connected to wifi network, one of them is started in APmode and the other one is connected to it through WiFi.softAP()for the 1st and WiFi.begin() for the 2nd. the problem is that the device is not receiving data on its IP 192.168.4.1 and port .. but even though it is accepting very easily and clearly from any computer or android mobile without any problem. is there any reason for this??

Welcome to the forum.
Please post pictures of your setup and your code as well.
If you take a moment and read this: https://forum.arduino.cc/t/how-to-get-the-best-out-of-this-forum/ it will help you format your code and get the most help possible.

you have to explain very specific what "accepting very easly and clearly" means?
Do you have a UDP-data-exchange up and running between a single ESP8266 and a smartphone?

Anyway without posting the code that is running on your ESPs no help can be given.
If your data-esxchange is limited to ESP8266-devices you could use the ESP-NOW protocol instead of UDP.

regardless of UDP or ESP-NOW. Programming works best by doing small steps and starting from a short test-code that is well known to work reliably. And then do small adpations and test again.
If you follow this rule the place where the bug is will be found almost always fast. Because there are only a few lines of code that are new.

The TTFTB-Time (The time to find the bug) = number of lines of code added since last test * 2 Minutes

best regards Stefan