5.2.2.2 Server
class Server
The
class controls the behaviour and the configuration of the FTP and telnet
Server
services running on the Pycom device. 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)
Quick Usage Example
from network import Server
# init with new user, password and seconds timeout
server = Server(login=('user', 'password'), timeout=60)
server.timeout(300) # change the timeout
server.timeout() # get the timeout
server.isrunning() # check whether the server is running or not
Constructors
class network.Server(id, ...)
Create a server instance, see
Methods
server.init(* , login=('micro', 'python'), timeout=300)
Init (and effectively start the server). Optionally a new
seconds) can be passed.
server.deinit()
Stop the server.
server.timeout([timeout_in_seconds])
for parameters of initialisation.
init
,
and
user
password
(in
timeout
297
Need help?
Do you have a question about the WiPy 3.0 and is the answer not in the manual?
Questions and answers