Self Update via Socket

General discussions and questions abound development of code with MicroPython that is not hardware specific.
Target audience: MicroPython Users.
Post Reply
User avatar
devnull
Posts: 473
Joined: Sat Jan 07, 2017 1:52 am
Location: Singapore / Cornwall
Contact:

Self Update via Socket

Post by devnull » Fri Feb 24, 2017 3:08 am

To save me re-inventing the wheel, does anyone have a code snippet that I can use to connect to a socket server and read a file line by line and save it locally ??

I am trying to create a self update app ?!

Or would it be better for the server to serve a file line by line as requested by the client, but this would be slower as the client would need to make a call to request each line ??

What's the best way of doing this ??

User avatar
Roberthh
Posts: 3667
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: Self Update via Socket

Post by Roberthh » Fri Feb 24, 2017 8:44 am

@spotlightkid has ported ftplib and made an ftp client, which works on esp8266: http://forum.micropython.org/viewtopic. ... ent#p17504
That may work for you too.

Post Reply