Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
AbhiK
Streaming Star

Is that any option for fetching multicast chunks in Roku

I am trying to fetch multicast chunks using roDataGramSocket and roStreamSocket but it gives an error for identifying a  "roSocketEvent". is there any other option for fetching video chunks in Roku.

Here is my sample code.

function Discover()
sock = CreateObject("roDatagramSocket")
sockPort = CreateObject("roMessagePort")

mock = CreateObject("roStreamSocket")
mockPort = CreateObject("roMessagePort")

addr = CreateObject("roSocketAddress")
addr1 = CreateObject("roSocketAddress")
buffer = Createobject("roByteArray")
buffer[1500]=0

sock.setBroadcast(true)
sock.SetMessagePort(sockPort)
mock.SetMessagePort(mockPort)
addr.setAddress("127.0.0.1:5003")
addr1.setAddress("multicastIP : Port")
mock.setAddress(addr)
sock.setAddress(addr1)
if sock.eOk() AND mock.eOk()
?"sock_mock_E_OK"
goto continue
end if

continue:
while true
sockEvent = sockPort.WaitMessage(1000)
mockEvent = mockPort.WaitMessage(1000)

if sck = "roSocketEvent" OR mck = "roSocketEvent"


chsckID = sockEvent.GetSocketID()
chmckID = mockEvent.GetSocketID()
if chsckID = sock.GetID() OR chmckID = mock.GetID()
if sock.isReadable()
message = sock.receive(buffer,0,1500)

buffer.ToAsciiString()
print mock.GetRcvBuf()
end if
if mock.isReadable()
message = mock.receive(buffer,0,1500)
print buffer.ToAsciiString()
print mock.GetRcvBuf()
end if
end if
else
if sockEvent = invalid
sock.GetReceiveTimeout()
end if

if mockEvent = invalid
mock.GetReceiveTimeout()
end if
end if
end while
end function

0 Kudos
1 REPLY 1
AbhiK
Streaming Star

Re: Is that any option for fetching multicast chunks in Roku

can anyone give me a suggestion for this?

 

0 Kudos