public static byte[] ToBytes(Puerts.ArrayBuffer value) { if (value != null) { var source = value.Bytes; var result = new byte[source.Length]; Array.Copy(source, 0, result, 0, source.Length); return(result); } return(null); }
public void Send(long sessionId, Puerts.ArrayBuffer buffer, int offset, int len) { base.GetSocket(sessionId)?.Send(buffer.Bytes, offset, len); }
public static void ArrayBufferArgChecked(Puerts.ArrayBuffer value) { Assert.IsTrue(value.Bytes.Length > 0); }
public static void ArrayBufferArg(Puerts.ArrayBuffer value) { }
public static void ArrayBufferRef(ref Puerts.ArrayBuffer value) { byte[] bytes = { 1 }; value = new ArrayBuffer(bytes); /*一时没想到怎么修改ab,先留着*/ }
public static void ArrayBufferOut(out Puerts.ArrayBuffer value) { byte[] bytes = { 1 }; value = new ArrayBuffer(bytes); }
public static void PushArrayBuffer(int jsEnvIdx, IntPtr isolate, ISetValueToJs setValueApi, IntPtr holder, ArrayBuffer arrayBuffer) { setValueApi.SetArrayBuffer(isolate, holder, arrayBuffer); }