direction: Client to Server
requirement: required
目的: SETUP method 可以讓 Client 告知 Server 端, 它可以用何種 mechanism 接受資料, 即使是一個已經存在的 stream, Client 也可以用 SETUP method 告知 Server 轉換成另一種 mechanism ( 若 Server 不 允 許, 則 傳 回 error message:"45x Method not valid in this state" ).
Example:
C -> S :
SETUP rtsp://example.com/foo/bar/baz.rm RTSP/1.0
CSeq: 302
Transport: RTP/AVP;unicast;client_port=4588
S -> C :
RTSP/1.0 200 OK
CSeq: 302
Date: 23 Jan 1997 15:35:06 GMT
Transport: RTP/AVP;unicast;client_port=4588;server_port=6255
说明:
1. unicast: 单播
2. multicast:组播
3. broadcast:广播