You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
hello, i'm trying to send a file through webrtc, but the file kept getting half corrupted during the send unless i added long awaits between each message. so i wrote this little code to see if webrtc is the problem
for (int i =0; i <1000; i++) {
final compressedData =jsonEncode(
{
'name':'file',
'data': i.toString(),
},
);
await webrtc.sendMessage(compressedData);
awaitFuture.delayed(constDuration(milliseconds:10));
}
and i print the numbers in my other client
final data =jsonDecode(model.data);
print("received data: $data");
and yes it was, it should print from 1 to 1000, but it skips many numbers ocassionally
if i delete the 10ms delay, it will only print 997,998,999, it won't send the other numbers at all!
if i add more delay to it, say 100ms, it will not skip any number. but i don't want to add long delays, as 1gb~ files will take a long time to be sent.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
hello, i'm trying to send a file through webrtc, but the file kept getting half corrupted during the send unless i added long awaits between each message. so i wrote this little code to see if webrtc is the problem
and i print the numbers in my other client
and yes it was, it should print from 1 to 1000, but it skips many numbers ocassionally
if i delete the 10ms delay, it will only print 997,998,999, it won't send the other numbers at all!
if i add more delay to it, say 100ms, it will not skip any number. but i don't want to add long delays, as 1gb~ files will take a long time to be sent.
is there any solution to this?
Beta Was this translation helpful? Give feedback.
All reactions