<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html style="direction: ltr;">
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"><style>body
p { margin-bottom: 0cm; margin-top: 0pt; } </style>
</head>
<body style="direction: ltr;"
bidimailui-detected-decoding-type="latin-charset" bgcolor="#ffffff"
text="#000000">
I have an rtsp camera feed that I'm happily reading data off.<br>
<br>
Occasionally, the camera stops responding and needs to be reset --
in which case, blocking reads and connects can take more than a
minute to fail.<br>
<br>
Is there any way to do that asynchronously? e.g., "read packet but
return immediately if no packet there" or something like that?
and/or, is it possible to select() on the sockets so I know if
anything is going to block before trying to read?<br>
<br>
Alternatively, is there a way I can set up (say) a 1-second timeout
and retry?<br>
<br>
Or is the only way to achieve this asynchrony is by starting another
thread?<br>
<br>
Thanks in advnace.<br>
</body>
</html>