Chat freely about anything...

User avatar
By dibrony
#78644 Hi all,

I am working on an ESP8266 project where I need to communicate to through the internet. I got my own domain and I wrote an aspx.net (VB.net) code that is suitable with the ESP8266 sketch, all is working properly between the ESP8266 and the website... however the ESP has to open a connection with the server (domain) to get the required info then close it which takes around 5 seconds each time... I would like to have the info instantly arrived to the ESP once it reaches the server, maybe by interrupting the ESP (if feasible) or open and keep the connection opened between the ESP and the server ....
Anyone can suggest a solution ?
Thanks in advance.
User avatar
By schufti
#78670 then you have to:
a) have the connection between esp and server open all time (as you allready realized)
or
b) have the esp listen on a port for connections from your server and your server "push" the message to the esp (via the listening port)

with b) needing the esp to be reachable from the internet (not behind firewall / nat)
User avatar
By dibrony
#78686 Thanks Schufti,

for a), is this method applicable in case 100 ESP or more should connect to the same server simultaneously ?
for b), any code or tutorial to start with ? I will do my search of course but maybe you have something helpful.
Is method b) the same as using port forwarding method ?

Actually there is no firewall.
User avatar
By QuickFix
#78699 To me it's not entirely clear what your goal is, but please know that an ESP can only handle about 4 or 5 concurrent connections at a time. :idea:
So, as a intermediate between (for example) a sensor and a real webserver it could work perfectly, but don't let an ESP work as an "End-server" (you've got to let your webserver do the actual work and return cached data).