Jump to content
  • 0

Unity SDK DataChannel


gtk2k
 Share

Question

  • Answers 11
  • Created
  • Last Reply

Top Posters For This Question

11 answers to this question

Recommended Posts

  • 0
thanks you. I was able to send and receive strings on the data channel.
However, there is an extra character at the end of the received string ("test"-> "testV")
  > String conversion error: Partial byte sequence encountered in the input.
Error occurs.

Also, I want you to support sending and receiving binary data.
Link to comment
Share on other sites

  • 0
// Sender
sendInterval += Time.deltaTime;
if(sendInterval >= 1f)
{
    sendInterval = 0f;
    sendLength += 100;
    var sendData = new string('w', sendLength);
    Debug.Log($"SendData length:{sendLength}");
    sora.SendDataChannelMessage(sendData);
}

// Receiver
sora.OnNotify = (data) =>
{
    Debug.Log($"Receive via DataChannel: {data.Length}");
};


It is the result of testing with such code
Sometimes it receives a length other than XX00 or the received data drops.




test.mp4

Link to comment
Share on other sites

  • 0

I'm not sure how this is related to SDK. If your processor has a margin of error and can pass string 0.001 later than it should be, I'm not sure what is the issue here. I don't think a webrtc datachannel should bomb data channel messages constantly.

What happens when you try a real worl scenario where you wrote text and  send by button but don't mash it 10 times in a second.
Could you post your findings please?

Best Regards,
Enes.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...