-
Notifications
You must be signed in to change notification settings - Fork 0
/
mud.lua
48 lines (36 loc) · 778 Bytes
/
mud.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
---@class mud
mud = {}
---@param str string
---@param options mud.Options
function mud.send(str, options)
end
---@param bytes number[]
function mud.send_bytes(bytes)
end
---@param str string
function mud.output(str)
end
---@param str string
function mud.input(str)
end
---@param host string
---@param port number
---@param tls boolean | nil
function mud.connect(host, port, tls)
end
---@param callback fun(host: string, port: number)
function mud.on_connect(callback)
end
function mud.disconnect()
end
function mud.reconnect()
end
---@param callback fun(line: Line)
function mud.add_output_listener(callback)
end
---@param callback fun(line: Line)
function mud.add_input_listener(callback)
end
---@class mud.Options
---@param gag boolean
---@param skip_line boolean