Exemplo n.º 1
0
    public override void FrameGate_Input(Texture2D tex, long timestamp_us)
    {
        if (peer == null)
        {
            return;
        }
        if (receivedTextureBufferIsUpdated)
        {
            return;
        }
        inputTexturePixels    = tex.GetPixels32();
        inputTextureHandle    = GCHandle.Alloc(inputTexturePixels, GCHandleType.Pinned);
        inputTexturePixlesPtr = inputTextureHandle.AddrOfPinnedObject();
        peer.FramgeGate_Input(inputTexturePixlesPtr, (int)tex.width, (int)tex.height, timestamp_us);

        if (!localDataChan)
        {
            return;
        }
//        bool rst = peer.SendDataViaDataChannel(timestamp_us.ToString());
        bool rst = peer.SendDataViaDataChannel("hello");
    }
Exemplo n.º 2
0
 public void ConnectedAnswer(int id)
 {
     Debug.Log(id + ":connected");
     answer.SendDataViaDataChannel("hello from answer");
 }
Exemplo n.º 3
0
 public void ConnectedOffer(int id)
 {
     Debug.Log(id + ":connected");
     offer.SendDataViaDataChannel("hello from offer");
 }