Commit 5189ea6e authored by Mo Firouz's avatar Mo Firouz Committed by Andrei Mihu
Browse files

Add Stream Data lua RPC test.

parent 5c098558
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -53,3 +53,13 @@ local function send_notification(context, payload)
  nk.notifications_send(new_notifications)
end
nk.register_rpc(send_notification, "clientrpc.send_notification")

local function send_stream_data(context, payload)
  local stream = {
    Mode = 20,
    Label = "Stream Data Test",
  }
  nk.stream_user_join(context.UserId, context.SessionId, stream, false, false)
  nk.stream_send(stream, tostring(payload))
end
nk.register_rpc(send_stream_data, "clientrpc.send_stream_data")