From 4f714ed56fede4434a2b584c1ea7d149a599df4a Mon Sep 17 00:00:00 2001 From: Bart van Strien Date: Fri, 5 Jun 2015 12:29:46 +0200 Subject: [PATCH] Document core module --- doc/core.md | 47 +++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 41 insertions(+), 6 deletions(-) diff --git a/doc/core.md b/doc/core.md index efdbe08..b37ca1f 100644 --- a/doc/core.md +++ b/doc/core.md @@ -1,9 +1,44 @@ Functions --------- -`ssl.compression` -`ssl.create` -`ssl.info` -`ssl.setfd` -`ssl.setmethod` -`ssl.copyright` +### core.compression ### + + compression = core.compression(conn) + +Returns the compression method used in a particular `conn` object. Can fail, +in which case it returns nil, followed by an error message. + +### core.create ### + + conn = core.create(context) + +Creates a new core connection object from a context. Use of `ssl.wrap` is +encouraged. + +### core.info ### + + buffer, numbits, processedbits, version = core.info(conn) + +Returns the information associated with a `conn` object. + +### core.setfd ### + + core.setfd(conn, fd) + +Set the `conn` object to use the given file descriptor. Usually done by +`ssl.wrap`. + +### core.setmethod ### + + core.setmethod(name, value) + +Set the the name and value as method/member on `conn` objects. Similar to the +following snippet: + + debug.getmetatable(conn).__index[name] = value + +### core.copyright ### + + copyright = core.copyright() + +Return copyright information for luasec.