TCP/UDP Server functions

wifi.connect(mode, IP-address, port)
Connects to a TCP/UDP-Server port

mode
"UDP" = UDP-Protocol
"TCP" = TCP/IP-Protocol

Example:
This code registers a UDP port


wifi.connect("UDP",7777);

wifi.start(port)
Create a TCP/UDP-Server port

port = port to listen as integer

Example:
This code creates a Server which listens to port 7777


wifi.start(7777);

wifi.stop()
Close TCP/UDP-Server

Example:
This code closes the server


wifi.stop();

wifi.writeln(Connection-ID, data) -> For multiple mode if more connections are open
Sends data to the connected port

Example:
Coming soon



wifi.readln(Connection-ID, data) -> For multiple mode if more connections are open
Sends data to the connected port

Example:
Coming soon



wifi.write(Connection-ID, data, Data length ) -> For multiple mode if more connections are open
Sends data to the connected port

Example:
Coming soon



wifi.read(Connection-ID, data, Data length, timeout ) -> For multiple mode if more connections are open
Receives data from the connected port

Example:
Coming soon



wifi.getipStatus()
Returns the status of a current TCP or UDP connection as String

Example:
Coming soon



wifi.getDevices()
Returns an list of current connected IP´s as String

Example:
Coming soon



wifi.setTCPServerTimeout(timeout)
Changes the timeout for TCP-Server connections in Seconds (default: 180s)

Example:
Coming soon