summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorPaul Sokolovsky <pfalcon@users.sourceforge.net>2017-06-03 13:34:28 +0300
committerPaul Sokolovsky <pfalcon@users.sourceforge.net>2017-06-03 13:34:28 +0300
commit92206a78aeddf81eca08fb25589231e5a62df69c (patch)
tree2f88e8fa4ffd68009f72a506f808f1bc306c4701
parent22ca5390f7ec55400bd55cec5e52fc6c704f8be7 (diff)
downloadmicropython-92206a78aeddf81eca08fb25589231e5a62df69c.tar.gz
micropython-92206a78aeddf81eca08fb25589231e5a62df69c.zip
docs/network: Move confusingly-named cc3200 Server class to its reference.
cc3200 port has network.Server class to control behavior of builtin Telnet/FTP server of that port.
-rw-r--r--docs/library/network.rst46
-rw-r--r--docs/wipy/general.rst37
2 files changed, 37 insertions, 46 deletions
diff --git a/docs/library/network.rst b/docs/library/network.rst
index 251e68c76e..75640250f7 100644
--- a/docs/library/network.rst
+++ b/docs/library/network.rst
@@ -29,52 +29,6 @@ For example::
data = s.recv(1000)
s.close()
-.. only:: port_wipy
-
- .. _network.Server:
-
- class Server
- ============
-
- The ``Server`` class controls the behaviour and the configuration of the FTP and telnet
- services running on the WiPy. Any changes performed using this class' methods will
- affect both.
-
- Example::
-
- import network
- server = network.Server()
- server.deinit() # disable the server
- # enable the server again with new settings
- server.init(login=('user', 'password'), timeout=600)
-
- Constructors
- ------------
-
- .. class:: network.Server(id, ...)
-
- Create a server instance, see ``init`` for parameters of initialization.
-
- Methods
- -------
-
- .. method:: server.init(\*, login=('micro', 'python'), timeout=300)
-
- Init (and effectively start the server). Optionally a new ``user``, ``password``
- and ``timeout`` (in seconds) can be passed.
-
- .. method:: server.deinit()
-
- Stop the server
-
- .. method:: server.timeout([timeout_in_seconds])
-
- Get or set the server timeout.
-
- .. method:: server.isrunning()
-
- Returns ``True`` if the server is running, ``False`` otherwise.
-
.. only:: port_pyboard
class CC3K
diff --git a/docs/wipy/general.rst b/docs/wipy/general.rst
index 8b9b91c534..ca6f77ab05 100644
--- a/docs/wipy/general.rst
+++ b/docs/wipy/general.rst
@@ -323,3 +323,40 @@ Unrelated function in machine module
this function is not called then the default file main.py will be executed.
It only makes sense to call this function from within boot.py.
+
+Adhoc way to control telnet/FTP server via network module
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The ``Server`` class controls the behaviour and the configuration of the FTP and telnet
+services running on the WiPy. Any changes performed using this class' methods will
+affect both.
+
+Example::
+
+ import network
+ server = network.Server()
+ server.deinit() # disable the server
+ # enable the server again with new settings
+ server.init(login=('user', 'password'), timeout=600)
+
+.. class:: network.Server(id, ...)
+
+ Create a server instance, see ``init`` for parameters of initialization.
+
+.. method:: server.init(\*, login=('micro', 'python'), timeout=300)
+
+ Init (and effectively start the server). Optionally a new ``user``, ``password``
+ and ``timeout`` (in seconds) can be passed.
+
+.. method:: server.deinit()
+
+ Stop the server
+
+.. method:: server.timeout([timeout_in_seconds])
+
+ Get or set the server timeout.
+
+.. method:: server.isrunning()
+
+ Returns ``True`` if the server is running, ``False`` otherwise.
+