Skip to content

Commit

Permalink
fix: ws库的send函数的api注释错了
Browse files Browse the repository at this point in the history
  • Loading branch information
wendal committed May 22, 2023
1 parent 8722993 commit 6ce7e46
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions components/network/websocket/luat_lib_websocket.c
Original file line number Diff line number Diff line change
Expand Up @@ -332,11 +332,16 @@ static int l_websocket_autoreconn(lua_State *L)
发布消息
@api wsc:send(data, fin, opt)
@string 待发送的数据,必填
@int 是否为最后一帧,默认1
@int 操作码, 默认为字符串帧
@int 是否为最后一帧,默认1,即马上设置为最后一帧, 也就是单帧发送
@int 操作码, 默认为字符串帧0, 可选1
@return bool 成功返回true,否则为false或者nil
@usage
wsc:publish("/luatos/123456", "123")
-- 简单发送数据
wsc:send("123")
-- 分段发送数据, 最后要用1(即FIN帧结束)
wsc:send("123", 0)
wsc:send("456", 0)
wsc:send("789", 1)
*/
static int l_websocket_send(lua_State *L)
{
Expand Down

0 comments on commit 6ce7e46

Please sign in to comment.