1

I try to send a picture weight some mb over Networking (UNet) API of Unity. If try [ClientRpc] call, but it complain about the size of the packet... of course. I know I could use WWW to send this file, but think it is not possible to receive such packet over Lan Networking. It is ?

Do you know what is there is a proper way to send huge file ? Or do I reeealy have to manually split into many many packet ?

Thanks

Orion
  • 301
  • 3
  • 12
  • 1
    With UNet, you have to split the file then send. If you don't want to do this the use raw socket to send it. – Programmer Mar 07 '18 at 17:30

2 Answers2

0

You're supposed to send a reference (like a name as a string) of that file, not the entire file. that means that every client needs access to that file.

Marek Legris
  • 113
  • 1
  • 9
  • I cannot, it is a screenshot the server (pc) made and have to send right away to one client – Orion Mar 13 '18 at 08:57
  • or else, I should run an apache server and share url to make a www request over file sharing... which make the deployment harder – Orion Mar 13 '18 at 08:57
0

I found a UNet splitter to send my photo using UNet (https://answers.unity.com/questions/1113376/unet-send-big-amount-of-data-over-network-how-to-s.html) but it take about 10s to send a picture ~1mb...

I also make another Socket connection using .Net. File sharing is almost instant, but you have to manage another connect/disconnect networking which is source of error and bugs and warning and pain (Unity: Live Video Streaming)

Orion
  • 301
  • 3
  • 12