MCPcopy Index your code
hub / github.com/NativeScript/SimDeck / send_forward_socket_data

Function send_forward_socket_data

packages/server/src/webkit.rs:923–946  ·  view source on GitHub ↗
(
    writer: &mut W,
    connection_id: &str,
    app_id: &str,
    page_id: u64,
    sender_id: &str,
    data: &[u8],
)

Source from the content-addressed store, hash-verified

921}
922
923async 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
948async fn send_forward_did_close<W: AsyncWrite + Unpin>(
949 writer: &mut W,

Callers

nothing calls this directly

Calls 3

rpc_argsFunction · 0.85
send_rpcFunction · 0.85
insertMethod · 0.80

Tested by

no test coverage detected