Page 3 of 4
Re: LUMIX GX80 UDP Streaming
Posted: Sat Oct 24, 2020 3:13 pm
by sinisrus
ReceiveUDPData() Max size is 8192 I can't get more
(
Re: LUMIX GX80 UDP Streaming
Posted: Sun Oct 25, 2020 11:27 pm
by lazi
No, it is a default value which is valid if you not set the 'size' parameter.
If you want other maximum number of bytes to receive then set it at the second value of the function.
Re: LUMIX GX80 UDP Streaming
Posted: Sun Oct 25, 2020 11:43 pm
by sinisrus
I know but no matter what value I put 65527 or 80,000 or 10,000 I always have packages of 8192
Re: LUMIX GX80 UDP Streaming
Posted: Mon Oct 26, 2020 9:23 pm
by plouf
if you have any problem, you should create a small, smallest possible code to demostrate problem
here i have modified a bit some samples and yes i see that 8192 seems to be a hardcore limit, or we are doing something wrong
the following test files are tested in Windows and as long as i send 819_3_ bytes i get error "message too long
so either we are doing soemthing wrong, or hollywood has some hardcoded max limit to 8192
sample server demostaring our "problem"
Code: Select all
af = CreateUDPObject(Nil, 12345)
DebugPrint(GetLocalPort(af, #NETWORKUDP))
InstallEventHandler({onreceiveudpdata = Function(msg)
DebugPrint("received")
data$,ip$,port = ReceiveUDPData(af,10000)
OpenFile(1,"c:\\receiveudpdata.raw",#MODE_WRITE)
WriteString(1,data$)
CloseFile(1)
DebugPrint("ok")
EndFunction})
Repeat
WaitEvent
Forever
sample client
Code: Select all
CreateUDPObject(1)
For i=1 To 1
For y=1 To 8192
data$ = data$.. ToString(i)
Next
Next
InstallEventHandler({onkeyup = Function(msg)
SendUDPData(1,data$, "127.0.0.1", 12345)
EndFunction})
Repeat
WaitEvent
Forever
Re: LUMIX GX80 UDP Streaming
Posted: Tue Oct 27, 2020 12:38 am
by sinisrus
Yes i have error ! :-/
Re: LUMIX GX80 UDP Streaming
Posted: Wed Oct 28, 2020 10:45 pm
by airsoftsoftwair
Yes, you're right.
ReceiveUDPData() is limited to 8192 bytes per call. Actually we've had this before, see here:
viewtopic.php?f=4&t=2237
Re: LUMIX GX80 UDP Streaming
Posted: Wed Oct 28, 2020 10:49 pm
by plouf
no its not mentiom
manual clearly states
Code: Select all
size
optional: maximum number of bytes to receive (defaults to 8192 bytes)
which means that it set to 8192 but if you CHANGE size with size attribute you can have a differenct size
either 1024 or 65535 , which is ,in my knowledge, true udp limit
Re: LUMIX GX80 UDP Streaming
Posted: Wed Oct 28, 2020 10:52 pm
by airsoftsoftwair
I've edited my reply. It is mentioned in the latest Hollywood master because of this report:
viewtopic.php?f=4&t=2237 But it's not in the 8.0 docs.
Re: LUMIX GX80 UDP Streaming
Posted: Wed Oct 28, 2020 10:58 pm
by plouf
ok, so this is a hollywood limitaion but how to workaround if a server sends bigger files ?
i have try the following
Code: Select all
data$,ip$,port = ReceiveUDPData(af,4096)
data2$,ip$,port = ReceiveUDPData(af,4096)
yet again hollywood fails in FIRST line because data to be received are larger that its "size" so is there a workaround for this ?
fails message in debug
Error in line 7 (UDP-test_Server_bigfile.hws): The following network error occurred:
Message too long
Re: LUMIX GX80 UDP Streaming
Posted: Wed Oct 28, 2020 11:02 pm
by airsoftsoftwair
What is the test code and test system? The code you posted
here works for me on Windows.