nixio.README.html 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  2. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  3. <html>
  4. <head>
  5. <title>Reference</title>
  6. <link rel="stylesheet" href="../luadoc.css" type="text/css" />
  7. <!--meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/-->
  8. </head>
  9. <body>
  10. <div id="container">
  11. <div id="product">
  12. <div id="product_logo"></div>
  13. <div id="product_name"><big><b></b></big></div>
  14. <div id="product_description"></div>
  15. </div> <!-- id="product" -->
  16. <div id="main">
  17. <div id="navigation">
  18. <h1>LuaDoc</h1>
  19. <ul>
  20. <li><a href="../index.html">Index</a></li>
  21. </ul>
  22. <!-- Module list -->
  23. <h1>Modules</h1>
  24. <ul>
  25. <li>
  26. <a href="../modules/luci.dispatcher.html">luci.dispatcher</a>
  27. </li>
  28. <li>
  29. <a href="../modules/luci.http.html">luci.http</a>
  30. </li>
  31. <li>
  32. <a href="../modules/luci.http.conditionals.html">luci.http.conditionals</a>
  33. </li>
  34. <li>
  35. <a href="../modules/luci.http.date.html">luci.http.date</a>
  36. </li>
  37. <li>
  38. <a href="../modules/luci.http.mime.html">luci.http.mime</a>
  39. </li>
  40. <li>
  41. <a href="../modules/luci.i18n.html">luci.i18n</a>
  42. </li>
  43. <li>
  44. <a href="../modules/luci.ip.html">luci.ip</a>
  45. </li>
  46. <li>
  47. <a href="../modules/luci.ip.cidr.html">luci.ip.cidr</a>
  48. </li>
  49. <li>
  50. <a href="../modules/luci.json.html">luci.json</a>
  51. </li>
  52. <li>
  53. <a href="../modules/luci.jsonc.html">luci.jsonc</a>
  54. </li>
  55. <li>
  56. <a href="../modules/luci.jsonc.parser.html">luci.jsonc.parser</a>
  57. </li>
  58. <li>
  59. <a href="../modules/luci.model.ipkg.html">luci.model.ipkg</a>
  60. </li>
  61. <li>
  62. <a href="../modules/luci.model.uci.html">luci.model.uci</a>
  63. </li>
  64. <li>
  65. <a href="../modules/luci.rpcc.html">luci.rpcc</a>
  66. </li>
  67. <li>
  68. <a href="../modules/luci.rpcc.ruci.html">luci.rpcc.ruci</a>
  69. </li>
  70. <li>
  71. <a href="../modules/luci.sys.html">luci.sys</a>
  72. </li>
  73. <li>
  74. <a href="../modules/luci.sys.init.html">luci.sys.init</a>
  75. </li>
  76. <li>
  77. <a href="../modules/luci.sys.iptparser.html">luci.sys.iptparser</a>
  78. </li>
  79. <li>
  80. <a href="../modules/luci.sys.net.html">luci.sys.net</a>
  81. </li>
  82. <li>
  83. <a href="../modules/luci.sys.process.html">luci.sys.process</a>
  84. </li>
  85. <li>
  86. <a href="../modules/luci.sys.user.html">luci.sys.user</a>
  87. </li>
  88. <li>
  89. <a href="../modules/luci.sys.wifi.html">luci.sys.wifi</a>
  90. </li>
  91. <li>
  92. <a href="../modules/luci.util.html">luci.util</a>
  93. </li>
  94. <li>
  95. <a href="../modules/nixio.html">nixio</a>
  96. </li>
  97. <li>
  98. <a href="../modules/nixio.CHANGELOG.html">nixio.CHANGELOG</a>
  99. </li>
  100. <li>
  101. <a href="../modules/nixio.CryptoHash.html">nixio.CryptoHash</a>
  102. </li>
  103. <li>
  104. <a href="../modules/nixio.File.html">nixio.File</a>
  105. </li>
  106. <li><strong>nixio.README</strong></li>
  107. <li>
  108. <a href="../modules/nixio.Socket.html">nixio.Socket</a>
  109. </li>
  110. <li>
  111. <a href="../modules/nixio.TLSContext.html">nixio.TLSContext</a>
  112. </li>
  113. <li>
  114. <a href="../modules/nixio.TLSSocket.html">nixio.TLSSocket</a>
  115. </li>
  116. <li>
  117. <a href="../modules/nixio.UnifiedIO.html">nixio.UnifiedIO</a>
  118. </li>
  119. <li>
  120. <a href="../modules/nixio.bin.html">nixio.bin</a>
  121. </li>
  122. <li>
  123. <a href="../modules/nixio.bit.html">nixio.bit</a>
  124. </li>
  125. <li>
  126. <a href="../modules/nixio.crypto.html">nixio.crypto</a>
  127. </li>
  128. <li>
  129. <a href="../modules/nixio.fs.html">nixio.fs</a>
  130. </li>
  131. </ul>
  132. <!-- File list -->
  133. </div><!-- id="navigation" -->
  134. <div id="content">
  135. <h1>Class <code>nixio.README</code></h1>
  136. <p>
  137. General Information.</p>
  138. <h2>Tables</h2>
  139. <table class="table_list">
  140. <tr>
  141. <td class="name" nowrap><a href="#Errorhandling">Errorhandling</a></td>
  142. <td class="summary">
  143. General error handling information.</td>
  144. </tr>
  145. <tr>
  146. <td class="name" nowrap><a href="#Functions">Functions</a></td>
  147. <td class="summary">
  148. Function conventions.</td>
  149. </tr>
  150. <tr>
  151. <td class="name" nowrap><a href="#Platforms">Platforms</a></td>
  152. <td class="summary">
  153. Platform information.</td>
  154. </tr>
  155. <tr>
  156. <td class="name" nowrap><a href="#TLS-Crypto">TLS-Crypto</a></td>
  157. <td class="summary">
  158. Cryptography and TLS libraries.</td>
  159. </tr>
  160. </table>
  161. <br/>
  162. <br/>
  163. <h2><a name="tables"></a>Tables</h2>
  164. <dl class="table">
  165. <dt><a name="Errorhandling"></a><strong>Errorhandling</strong></dt>
  166. <dd>
  167. General error handling information.
  168. <ul>
  169. <li> Most of the functions available in this library may fail. If any error
  170. occurs the function returns <strong>nil or false</strong>, an error code
  171. (usually errno) and an additional error message text (if avaialable).</li>
  172. <li>At the moment false is only returned when a non-blocking I/O function
  173. fails with EAGAIN, EWOULDBLOCK or WSAEWOULDBLOCK for any others nil is
  174. returned as first parameter. Therefore you can use false to write portable
  175. non-blocking I/O applications.</li>
  176. <li>Note that the function documentation does only mention the return values
  177. in case of a successful operation.</li>
  178. <li>You can find a table of common error numbers and other useful constants
  179. like signal numbers in <strong>nixio.const</strong> e.g. nixio.const.EINVAL,
  180. nixio.const.SIGTERM, etc. For portability there is a second error constant
  181. table <strong>nixio.const_sock</strong> for socket error codes. This might
  182. be important if you are dealing with Windows applications, on POSIX however
  183. const_sock is just an alias for const.</li>
  184. <li>With some exceptions - which are explicitly stated in the function
  185. documentation - all blocking functions are signal-protected and will not fail
  186. with EINTR.</li>
  187. <li>On POSIX the SIGPIPE signal will be set to ignore upon initialization.
  188. You should restore the default behaviour or set a custom signal handler
  189. in your program after loading nixio if you need this behaviour.</li>
  190. </ul>
  191. </dd>
  192. <dt><a name="Functions"></a><strong>Functions</strong></dt>
  193. <dd>
  194. Function conventions.
  195. <br />In general all functions are namend and behave like their POSIX API
  196. counterparts - where applicable - applying the following rules:
  197. <ul>
  198. <li>Functions should be named like the underlying POSIX API function omitting
  199. prefixes or suffixes - especially when placed in an object-context (
  200. lockf -> File:lock, fsync -> File:sync, dup2 -> dup, ...)</li>
  201. <li>If you are unclear about the behaviour of a function you should consult
  202. your OS API documentation (e.g. the manpages).</li>
  203. <li>If the name is significantly different from the POSIX-function, the
  204. underlying function(s) are stated in the documentation.</li>
  205. <li>Parameters should reflect those of the C-API, buffer length arguments and
  206. by-reference parameters should be omitted for practical purposes.</li>
  207. <li>If a C function accepts a bitfield as parameter, it should be translated
  208. into lower case string flags representing the flags if the bitfield is the
  209. last parameter and also omitting prefixes or suffixes. (e.g. waitpid
  210. (pid, &s, WNOHANG | WUNTRACED) -> waitpid(pid, "nohang", "untraced"),
  211. getsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &opt, sizeof(opt)) ->
  212. Socket:getopt("socket", "reuseaddr"), etc.) </li>
  213. <li>If it is not applicable to provide a string representation of the
  214. bitfield a bitfield generator helper is provided. It is named FUNCTION_flags.
  215. (open("/tmp/test", O_RDONLY | O_NONBLOCK) -> open("/tmp/test", open_flags(
  216. "rdonly", "nonblock")))</li>
  217. </ul>
  218. </dd>
  219. <dt><a name="Platforms"></a><strong>Platforms</strong></dt>
  220. <dd>
  221. Platform information.
  222. <ul>
  223. <li>The minimum platform requirements are a decent POSIX 2001 support.
  224. Builds are more or less tested on Linux, Solaris and FreeBSD. Builds for
  225. Windows XP SP1 and later can be compiled with MinGW either from Windows
  226. itself or using the MinGW cross-compiler. Earlier versions of Windows are not
  227. supported.</li>
  228. <li>In general all functions which don't have any remarks
  229. in their documentation are available on all platforms.</li>
  230. <li>Functions with a (POSIX), (Linux) or similar prefix are only available
  231. on these specific platforms. Same appplies to parameters of functions
  232. with a similar suffix.</li>
  233. <li>Some functions might have limitations on some platforms. This should
  234. be stated in the documentation. Please also consult your OS API
  235. documentation.</li>
  236. </ul>
  237. </dd>
  238. <dt><a name="TLS-Crypto"></a><strong>TLS-Crypto</strong></dt>
  239. <dd>
  240. Cryptography and TLS libraries.
  241. <ul>
  242. <li>Currently 3 underlying cryptography libraries are supported: openssl,
  243. cyassl and axTLS. The name of the library in use is written to
  244. <strong>nixio.tls_provider</strong></li>
  245. <li>You should whenever possible use openssl or cyassl as axTLS has only
  246. limited support. It does not provide support for non-blocking sockets and
  247. is probably less audited than the other ones.</li>
  248. <li>As the supported Windows versions are not suitable for embedded devices
  249. axTLS is at the moment not supported on Windows.</li>
  250. </ul>
  251. </dd>
  252. </dl>
  253. </div> <!-- id="content" -->
  254. </div> <!-- id="main" -->
  255. <div id="about">
  256. <p><a href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0!" height="31" width="88" /></a></p>
  257. </div> <!-- id="about" -->
  258. </div> <!-- id="container" -->
  259. </body>
  260. </html>