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

Networking
sock
connpool
resolver
http
uri
rsync
libtls
libtls_bearssl
bearssl

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()
cstcp:recvn() same semantics as tcp:recvn()
cstcp:recvall() same semantics as tcp:recvall()
cstcp:recvall_read() same semantics as tcp:recvall_read()
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: 10 months ago | Edit on GitHub

Package:sock
Pkg type:Lua+ffi
Version: 10c356c
Last commit:
Author: Cosmin Apreutesei
License: Public Domain

Requires: coro  glue  heap  libtls  luajit  time  winapi 

Required by: connpool  dollar  webb  x-widgets 


Top