Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: EthernetNetIf mbed SDFileSystem
LaosServer Class Reference
Simple TCP/IP Server Create server based on config file. More...
#include <LaosServer.h>
Public Member Functions | |
| LaosServer (int port) | |
| Make new LaosServer object. | |
| int | read () |
| Read value. | |
| void | write (int i) |
| Write Integer value. | |
Detailed Description
Simple TCP/IP Server Create server based on config file.
Example:
LaosServer srv("config.txt"); int i = srv.read(); srv.write(i);
Definition at line 48 of file LaosServer.h.
Constructor & Destructor Documentation
| LaosServer | ( | int | port ) |
Make new LaosServer object.
Open config file. Note: the file handle is kept open during the lifetime of this object. To close the file: destroy this ConfigFile object!
- Parameters:
-
file Filename of the configuration file.
Definition at line 33 of file LaosServer.cpp.
Member Function Documentation
| int read | ( | ) |
Read value.
If socket is not open, this blocks
- Returns:
- integer value, read from socket
Definition at line 56 of file LaosServer.cpp.
| void write | ( | int | i ) |
Write Integer value.
If socket is not open, or cannot write: block
- Parameters:
-
i Integer
- Returns:
- "true" if the key is found "false" is key is not found (default value is returned)
Definition at line 71 of file LaosServer.cpp.
Generated on Thu Jul 14 2022 19:35:44 by
1.7.2