Document core module

This commit is contained in:
Bart van Strien 2015-06-05 12:29:46 +02:00
parent 9420dcda40
commit 4f714ed56f

View File

@ -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.