add message type

This commit is contained in:
zixun
2020-03-30 17:26:06 +08:00
committed by 云风
parent 7efa79906d
commit fd27676869
2 changed files with 4 additions and 3 deletions

View File

@@ -21,7 +21,8 @@ if MODE == "agent" then
print("--------------")
end
function handle.message(id, msg)
function handle.message(id, msg, msg_type)
assert(msg_type == "binary" or msg_type == "text")
websocket.write(id, msg)
end