I've added it to my copy and I'll hopefully be finishing a few bits of code off tonight to bundle with an updated release.
function luaLFS:small(reqi, subt, uval)
local omsg = bpack("bbbbL", 8, IS[B]P[/B]_SMALL, reqi, subt, uval)
luaLFS.sendmsg(omsg, string.len(omsg))
end
--------------
function luaLFS:mod(sixteenbit, refresh, width, height)
local omsg = bpack("bbbbllll", 20, IS[B]P[/B]_MOD, 0, 0, sixteenbit, refresh, width, height)
luaLFS.sendmsg(omsg, string.len(omsg))
end
LuaLFS v0.9
Powered By Lua 5.1
This product is developed as open source software.
Please review the bundled LICENSE, NOTICE and README files for further details.
Registered 'Keepalive' module
Registered 'Lua' module
Loading core
Loading Event IDs
Loading Events
Loading API v0.1
Loading scripts/connected.lua
Loading config
Sending 1 (Sizes: Sent 44, Actual 44)
Sending 3 (Sizes: Sent 4, Actual 4)
Connected
Calling hook connected funcs
luaLFS v0.9 connected
Sending 13 (Sizes: Sent 68, Actual 68)
sent
Sending 3 (Sizes: Sent 4, Actual 4)
Connection lost
Calling hook disconnected funcs
Calling hook create funcs
Closing 'Keepalive'
Closing 'Lua'
Connection to 'localhost' failed
Connection to 'localhost' failed
insim_recv: Connection Timeout
config =
{
--- Configuration for luaLFS
--- Must exist
luaLFS =
{
-- Auto reconnect
-- This is a VERY dangerous setting. It effectively puts luaLFS
-- into a recursive loop, trying to connect FOREVER.
-- If set it overrides connection_attempts
-- It is HIGHLY recommended that it remains set to 0, except for servers
-- Use at your own risk
auto_reconnect = 0,
-- Number of times luaLFS attempts to connect to LFS - overridden
-- if auto_reconnect is set
connection_attempts = 5,
-- ADVANCED
-- polling is the amount of time between select() timeouts
-- also used for the amount of time between connection attempts
polling = 5,
-- Minimum timeout in seconds before we assume LFS has been closed,
timeout = 70,
-- verbosity of luaLFS: consider as a debugging mode
verbose = 1,
},
--- Configuration for LFS
--- Must exist
LFS =
{
-- The address of computer running LFS
address = "localhost",
-- The port LFS is listening for InSim connections on
port = 29999,
-- The administrative password
password = "password",
-- Number of ms between NLP or MCI packets (0=none)
interval = 0,
-- Flags
-- Example; Requests both NLP and MCI packets;
-- flags = bit.bor(ISF_NLP, ISF_MCI),
-- Example; Allows for local buttons and gets NLP packets
-- flags = bit.bor(ISF_LOCAL, ISF_NLP),
flags = 0,
-- Character to prefix all messaged destined specifically for the host
prefix = "!",
},
}
Sending 1 (Sizes: Sent 44, Actual 44)
Sending 3 (Sizes: Sent 4, Actual 4)
Connected
Calling hook connected funcs
luaLFS v0.9 connected
Sending 13 (Sizes: Sent 68, Actual 68)
sent
retval 20, total local buffer size: 20
Recv 'Keepalive'
Recv 'Lua'
Received 2, size 20
Buffer size: 0
retval 28, total local buffer size: 28
Recv 'Keepalive'
Recv 'Lua'
Received 5, size 28
Buffer size: 0
LuaLFS v1.0
Powered By Lua 5.1
This product is developed as open source software.
Please review the bundled LICENSE, NOTICE and README files for further details.
Registered 'Keepalive' module
Registered 'Lua' module
Loading core
Loading Event IDs
Loading Events
Loading API v0.1
Loading scripts/connected.lua
Loading config
Sending 1 (Sizes: Sent 44, Actual 44)
Sending 3 (Sizes: Sent 4, Actual 4)
Connection established
Calling hook connected funcs
luaLFS v1.0 connected
Sending 13 (Sizes: Sent 68, Actual 68)
sent
Calling hook prerecv funcs
PreRecv 'Keepalive'
PreRecv 'Lua'
Calling hook prerecv funcs
PreRecv 'Keepalive'
PreRecv 'Lua'
Calling hook prerecv funcs
PreRecv 'Keepalive'
PreRecv 'Lua'
Calling hook prerecv funcs
PreRecv 'Keepalive'
PreRecv 'Lua'
Calling hook prerecv funcs
PreRecv 'Keepalive'
PreRecv 'Lua'
(goes on for 8kB)
Calling hook prerecv funcs
PreRecv 'Keepalive'
PreRecv 'Lua'
Calling hook prerecv funcs
PreRecv 'Keepalive'
PreRecv 'Lua'
Sending 3 (Sizes: Sent 4, Actual 4)
Disconnected
Calling hook disconnected funcs
Calling hook close funcs
Closing 'Keepalive'
Closing 'Lua'
Config: Warning, 'timeout' too low - reset from 40 to 70
hkeepalive_prerecv: Didn't receive ISP_VER response in a seemly amount of time.