lights FAQ Forum github.com/luapower/sock
This package
sock
libtls

Networking
sock
libtls
libtls_bearssl
bearssl
resolver
http
uri
rsync

local stls = require'sock_libtls'

Secure async TCP sockets with sock and libtls.

API

stls.client_stcp(tcp, servername, opt) -> cstcp create a secure socket for a client
stls.server_stcp(tcp, opt) -> sstcp create a secure socket for a server
cstcp:recv() same semantics as tcp:recv()
cstcp:send() same semantics as tcp:send()
sstcp:accept() -> cstcp accept a client connection
cstcp:shutdown('r'|'w'|'rw') calls self.tcp:shutdown()
cstcp:close() close client socket
sstcp:close() close server socket

Last updated: 5 months ago | Edit on GitHub

Package:sock
Pkg type:Lua
Version: 02fb2c5
Last commit:
Author: Cosmin Apreutesei
License: Public Domain

Requires: none

Required by: none


Top