| 921 | } |
| 922 | |
| 923 | async fn send_forward_socket_data<W: AsyncWrite + Unpin>( |
| 924 | writer: &mut W, |
| 925 | connection_id: &str, |
| 926 | app_id: &str, |
| 927 | page_id: u64, |
| 928 | sender_id: &str, |
| 929 | data: &[u8], |
| 930 | ) -> Result<(), AppError> { |
| 931 | let mut args = rpc_args(connection_id); |
| 932 | args.insert( |
| 933 | "WIRApplicationIdentifierKey".to_owned(), |
| 934 | Value::String(app_id.to_owned()), |
| 935 | ); |
| 936 | args.insert( |
| 937 | "WIRPageIdentifierKey".to_owned(), |
| 938 | Value::Integer(page_id.into()), |
| 939 | ); |
| 940 | args.insert( |
| 941 | "WIRSenderKey".to_owned(), |
| 942 | Value::String(sender_id.to_owned()), |
| 943 | ); |
| 944 | args.insert("WIRSocketDataKey".to_owned(), Value::Data(data.to_vec())); |
| 945 | send_rpc(writer, "_rpc_forwardSocketData:", args).await |
| 946 | } |
| 947 | |
| 948 | async fn send_forward_did_close<W: AsyncWrite + Unpin>( |
| 949 | writer: &mut W, |