[Live-devel] RTPInterface blocking readsocket()
Ross Finlayson
finlayson at live555.com
Thu Dec 11 22:52:08 PST 2008
>I'm using livemedia to stream over TCP. In the RTPInterface file
>there is a function tcpReadHandler() which handles all the data
>received from the client (reports, commands, ...). This function
>tries to read a '$' through a non-blocking call to readSocket().
>Afterwards several more bytes are read, but this time no timeout is
>supplied making these calls blocking.
If the RTP-over-TCP data is well-formed, then there shouldn't be any
blocking, because the data should be present in the correct format:
'$';1-byte stream channel id; 2-byte packet size; packet data.
Perhaps the data that you are sending is not well-formed (though it
you're using our server, it should be)?
You're correct, though, that the code should probably be made more
tolerant of malformed data (e.g., by including the (otherwise
optional) "timeout" parameter to "readSocket()" and
"readSocketExact()").
--
Ross Finlayson
Live Networks, Inc.
http://www.live555.com/
More information about the live-devel
mailing list