With RTSP/UDP, how does server know where to send reply?
Although I have yet to see an RTSP-capable player t开发者_Python百科hat uses UDP for the RTSP control channel, RFC2326 allows for UDP to be used. However it does not specify how a client should tell the server where to send the RTSP replies. Is there any established convention for this, or am i going to have to make one up?
Not the answer you want to hear but do you really need it? Like you said I haven't seen any players or servers out there. From Martin Stiemerling's site, one of the authors of the RTSP 2 draft:
This memorandum describes the use of RTSP over a reliable connection based transport level protocol such as TCP. RTSP may be implemented over an unreliable connectionless transport protocol such as UDP. While nothing in RTSP precludes this, additional definition of this problem area needs to be handled as an extension to the core specification.
The mechanisms of RTSP's operation over UDP were left out of this spec. because they were poorly defined in [RFC2326] and the tradeoff in size and complexity of this memorandum for a small gain in a limited problem space was not deemed justifiable.
FYI, latest version of the RTSP 2 draft is available here.
Well, there is a default port: 554. But, if you can't use it, then yes, you are going to have to make your own convention.
If you dig deeper in this problem, you'll hit the NAT traversal issue too, which implies that 554 may be translated into any other port number by NATs. This is a different issue not covered by this RFC, but it is real and you will need a solution if you operate on ipv4.
精彩评论