[Live-devel] Client connection timeout

Erlandsson, Claes P (CERLANDS) CERLANDS at arinc.com
Thu Sep 27 13:02:41 PDT 2012


When connecting to a server that doesn't respond, or is just slow, the
timeout appears to be around 25s, i.e. the time before the response handler
is called.

Is there a way to decrease this time?

 

 

Why? Well, in the project I'm working on there are lots of changing cameras
that are on a 10s cycle, so there is no need to try for more than 10s. While
I assume it should be ok to call shutdown() while the client is still trying
(and stop the event loop etc), it would be beneficial to be able to wait for
the response handler to return.

 

I've seen some lingering connections in rare cases, which most likely is due
to my code, but it would nonetheless be nicer to always wait for the
response handler. These yet unexplained lingering connections happens for
maybe 1 stream out of 20000.

 

When looking in the code the only somewhat related variable or function I
see is the sessionTimeoutParameter which doesn't seem to have anything with
the connection timeout to do.

 

 

Two testRTSPClient examples below. In the first I just connect to an
arbitrary URL where there is no server that responds, and it takes about 25s
before the response handler is called. In the second example our Cisco VSM
is bogged down and it takes 30s for it to respond.

 

 

e:\projects\live\Release>testRTSPClient.exe rtsp://ibm.com/moo

!!!  fInputSocketNum -1

Opening connection to 129.42.38.1, port 554...

!!!  connectResult 0

...Connection to server failed: Unknown error

[URL:"rtsp://ibm.com/moo"]: Failed to get a SDP description: Connection to
server failed: Unknown error

[URL:"rtsp://ibm.com/moo"]: Closing the stream.

 

 

e:\projects\live\Release>testRTSPClient.exe rtsp://192.168.1.103/live/TVF-16

!!!  fInputSocketNum -1

Opening connection to 192.168.1.103, port 554...

!!!  connectResult 0

...remote connection opened

!!!  fInputSocketNum 124

Sending request: DESCRIBE rtsp://192.168.1.103/live/TVF-16 RTSP/1.0

CSeq: 2

User-Agent: testRTSPClient.exe (LIVE555 Streaming Media v2012.09.13)

Accept: application/sdp

 

 

Received 61 new bytes of response data.

Received a complete DESCRIBE response:

RTSP/1.0 500 Server Error (Unable to open proxy)

CSeq: 2

 

 

[URL:"rtsp://192.168.1.103/live/TVF-16"]: Failed to get a SDP description:
500 Server Error (Unable to open proxy)

[URL:"rtsp://192.168.1.103/live/TVF-16"]: Closing the stream.

 

 

/Claes

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20120927/a5c18c88/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 5740 bytes
Desc: not available
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20120927/a5c18c88/attachment-0001.bin>


More information about the live-devel mailing list