forked from luca/mineqtt
1
0
Fork 0

style: convert snake_case to camelCase

This commit is contained in:
Luca 2024-09-05 17:00:57 +02:00
parent f9b8ecf600
commit 26c6b24c78
1 changed files with 3 additions and 3 deletions

View File

@ -1,6 +1,6 @@
local mqtt = {} local mqtt = {}
local read_varint = function (conn, first_byte) local readVarint = function (conn, first_byte)
local b local b
if first_byte == nil then if first_byte == nil then
b = conn:read(1) b = conn:read(1)
@ -42,7 +42,7 @@ function MqttClient:new (conn)
setmetatable(c, self) setmetatable(c, self)
self.__index = self self.__index = self
conn.read_varint = read_varint conn.readVarint = readVarint
conn:setTimeout(1) conn:setTimeout(1)
c.conn = conn c.conn = conn
@ -60,7 +60,7 @@ function MqttClient:handle ()
local ptype, length, _ = string.unpack("B B", s) local ptype, length, _ = string.unpack("B B", s)
local length, err = self.conn:read_varint(length) local length, err = self.conn:readVarint(length)
if err ~= nil then if err ~= nil then
return err return err
end end