requestCommand
requestCommand
Sends a raw command directly over a real-time channel such as WebSocket.
Parameters
command(String): The command string to send to the serverdata(String): The data to send with the command (a JSON-serializable object)channel(String): The name of the channel to send on
Returns: None (void)
Description
Use it to send an arbitrary command message directly to a channel, instead of a Provider Instance's structured request. This suits servers whose protocol is command-based.
Example
// 특정 채널로 커스텀 커맨드 전송
$vm.requestCommand("PING", { timestamp: "2026-07-08" }, "mainChannel");
// 구독 요청 커맨드
$vm.requestCommand("SUBSCRIBE", { topic: "stock.005930" }, "realtime");
Related
$vm.subscribeData(provInstName, callback)— PI-based real-time subscription$vm.requestData(provInstName)— PI-based data request