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 Functions
--------- ---------
`ssl.compression` ### core.compression ###
`ssl.create`
`ssl.info` compression = core.compression(conn)
`ssl.setfd`
`ssl.setmethod` Returns the compression method used in a particular `conn` object. Can fail,
`ssl.copyright` 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.