-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make the telnet example an Lua module (#3133)
Also update ftp server
- Loading branch information
1 parent
f20591a
commit 8d091c4
Showing
7 changed files
with
247 additions
and
322 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# Telnet Module | ||
|
||
| Since | Origin / Contributor | Maintainer | Source | | ||
| :----- | :-------------------- | :---------- | :------ | | ||
| 2018-05-24 | [Terry Ellison](https://github.com/TerryE) | [Terry Ellison](https://github.com/TerryE) | [telnet.lua](../../lua_modules/telnet/telnet.lua) | | ||
|
||
The current version of this module exploits the stdin / stdout pipe functionality and | ||
task integration that is now build into the NodeNMCU Lua core. | ||
|
||
There are two nice advantages of this core implementation: | ||
|
||
- Errors are now written to stdout in a separate task execution. | ||
- The pipes pretty much eliminate UART and telnet overrun. | ||
|
||
Both have the same interface if required into the variable `telnet` | ||
|
||
## telnet:open() | ||
|
||
Open a telnet server based on the provided parameters. | ||
|
||
#### Syntax | ||
|
||
`telnet:open(ssid, pwd, port)` | ||
|
||
#### Parameters | ||
|
||
`ssid` and `password`. Strings. SSID and Password for the Wifi network. If these are | ||
`nil` then the wifi is assumed to be configured or auto-configured. | ||
|
||
`port`. Integer TCP listening port for the Telnet service. The default is 2323 | ||
|
||
#### Returns | ||
|
||
Nothing returned (this is evaluated as `nil` in a scalar context). | ||
|
||
## telnet:close() | ||
|
||
Close a telnet server and release all resources. Also set the variable `telnet` to nil to fully reference and GC the resources. | ||
|
||
#### Syntax | ||
|
||
`telnet:close()` | ||
|
||
#### Parameters | ||
|
||
None | ||
|
||
#### Returns | ||
|
||
Nothing returned (this is evaluated as `nil` in a scalar context). |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.