ESP8266 how to disable sleep

Hello,
I am a new ESP8266 user. I use it from Robotdyn (mega + wifi). I have programmed it to communicate on serial with mega2560 and on wifi with java tcp server.
But I have a little problem. The ESP8266 always disconnect from server. It seems that it goes to sleep but I am not sure in it.
Please help me how to disable sleep?
I want to go wifi and tcp connection constantly.
Thank you for your help.
Best regards,
Suby (exuce me for my English)
I am a new ESP8266 user. I use it from Robotdyn (mega + wifi). I have programmed it to communicate on serial with mega2560 and on wifi with java tcp server.
But I have a little problem. The ESP8266 always disconnect from server. It seems that it goes to sleep but I am not sure in it.
Please help me how to disable sleep?
I want to go wifi and tcp connection constantly.
Thank you for your help.
Best regards,
Suby (exuce me for my English)