I am seding out a UDP request to device and its answer is 1407 bytes long, ive tested in Node.JS and it works.
When doing it from Control4 I only get 1024 bytes, ReceivedFromNetwork is only called once, so I cannot get the remainder of the data.
Is there a way around this?
function test()
myip = C4:GetMyNetworkAddress()
C4:NetDisconnect(6998, 2345)
C4:CreateNetworkConnection (6998, myip)
C4:NetConnect (6998, 2345, 'UDP')
end
function OnConnectionStatusChanged(idBinding, nPort, strStatus)
if (idBinding == 6998) then
if (strStatus == "ONLINE") then
test_message = "this is a test"
C4:SendToNetwork(6998, 2345, test_message)
end
end
end
function ReceivedFromNetwork(idBinding, nPort, StrData)
MessagePrint("ReceivedFromNetwork idBinding=" .. idBinding .. " port=" .. nPort)
len=string.len(StrData)
MessagePrint("Length=" .. len)
end