no response
(command string, data any, opts *wshrpc.RpcOpts)
| 513 | |
| 514 | // no response |
| 515 | func (w *WshRpc) SendCommand(command string, data any, opts *wshrpc.RpcOpts) error { |
| 516 | var optsCopy wshrpc.RpcOpts |
| 517 | if opts != nil { |
| 518 | optsCopy = *opts |
| 519 | } |
| 520 | optsCopy.NoResponse = true |
| 521 | optsCopy.Timeout = 0 |
| 522 | handler, err := w.SendComplexRequest(command, data, &optsCopy) |
| 523 | if err != nil { |
| 524 | return err |
| 525 | } |
| 526 | handler.finalize() |
| 527 | return nil |
| 528 | } |
| 529 | |
| 530 | // single response |
| 531 | func (w *WshRpc) SendRpcRequest(command string, data any, opts *wshrpc.RpcOpts) (any, error) { |
no test coverage detected