Another question, if I have in a function a while loop reading one byte at the time, trying to find Chr(10), do I have to do a wait for a "roSocketEvent" inside the function even if I have a "roSocketEvent" inside the main loop?
function main() as void
'...
while true
event = wait(0, port)
if type(event) = "roSocketEvent" then
doSomething()
end if
end while
end function
function doSomething() as string
while true
event = wait(0, port) ' <-- is this necessary?
if type(event) = "roSocketEvent" then ' <-- is this necessary?
' read from the socket 1000 bytes 1 by 1
end if
end while
end function
https://github.com/e1ioan/
http://rokucam.com