Software /
code /
prosody
Comparison
teal-src/net/server.d.tl @ 12610:e2fdcd386ebb
net.server: Add teal description file
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 24 Jul 2022 21:25:17 +0200 |
comparison
equal
deleted
inserted
replaced
12609:a8eb838fc6cf | 12610:e2fdcd386ebb |
---|---|
1 local record server | |
2 record LuaSocketTCP | |
3 end | |
4 record LuaSecCTX | |
5 end | |
6 | |
7 record extra_settings | |
8 end | |
9 | |
10 record interface | |
11 end | |
12 enum socket_type | |
13 "tcp" | |
14 "tcp6" | |
15 "tcp4" | |
16 end | |
17 | |
18 record listeners | |
19 onconnect : function (interface) | |
20 ondetach : function (interface) | |
21 onattach : function (interface, string) | |
22 onincoming : function (interface, string, string) | |
23 ondrain : function (interface) | |
24 onreadtimeout : function (interface) | |
25 onstarttls : function (interface) | |
26 onstatus : function (interface, string) | |
27 ondisconnect : function (interface, string) | |
28 end | |
29 | |
30 get_backend : function () : string | |
31 | |
32 type port = string | integer | |
33 enum read_mode | |
34 "*a" | |
35 "*l" | |
36 end | |
37 type read_size = read_mode | integer | |
38 addserver : function (string, port, listeners, read_size, LuaSecCTX) : interface | |
39 addclient : function (string, port, listeners, read_size, LuaSecCTX, socket_type, extra_settings) : interface | |
40 record listen_config | |
41 read_size : read_size | |
42 tls_ctx : LuaSecCTX | |
43 tls_direct : boolean | |
44 sni_hosts : { string : LuaSecCTX } | |
45 end | |
46 listen : function (string, port, listeners, listen_config) : interface | |
47 enum quitting | |
48 "quitting" | |
49 end | |
50 loop : function () : quitting | |
51 closeall : function () | |
52 setquitting : function (boolean | quitting) | |
53 | |
54 wrapclient : function (LuaSocketTCP, string, port, listeners, read_size, LuaSecCTX, extra_settings) : interface | |
55 wrapserver : function (LuaSocketTCP, string, port, listeners, listen_config) : interface | |
56 watchfd : function (integer | LuaSocketTCP, function (interface), function (interface)) : interface | |
57 link : function () | |
58 | |
59 record config | |
60 end | |
61 set_config : function (config) | |
62 | |
63 end | |
64 | |
65 return server |