TsgcWSPClient_sgc › 方法 › Notify
向服务器发送不需要响应的单向通知。
procedure Notify(const aMethod: string; const aParams: string = ''; const aGuid: String = ''; const aQueue: TwsQueue = queueLevel0);
| 名称 | 类型 | 描述 |
|---|---|---|
aMethod | const string | 要在服务器上调用的远程方法名称。 |
aParams | const string | 可选的参数有效载荷(通常是 JSON 字符串)。 |
aGuid | const String | 目标服务器端 sgc 协议实例的可选 Guid。留空以使用默认值。 |
aQueue | const TwsQueue | 服务器对通知应用事务性队列时使用的队列级别。 |
Notify 是 RPC 的"即发即忘"变体:不生成 ID,既不触发 OnRPCResult 也不触发 OnRPCError。当客户端不需要将响应与调用进行关联时使用。
oProtocol.Notify('log', '{"text":"client started"}');