protocol/rtsp: removed Client field from client struct as not useful

This commit is contained in:
Saxon 2019-04-26 14:07:29 +09:30
parent a0fb299b06
commit cd18d9f5a7
1 changed files with 2 additions and 5 deletions

View File

@ -41,7 +41,6 @@ type Client struct {
urlStr string
url *url.URL
conn net.Conn
Client string
}
// NewClient returns a pointer to a new Client. The URL u will be parsed and
@ -82,15 +81,13 @@ func (s *Client) Setup(track, transport string) (*Response, error) {
func(req *Request) {
req.Header.Add("Transport", transport)
},
func(resp *Response) {
s.Client = resp.Header.Get("Client")
},
nil,
)
}
// Play forms and sends an RTSP request of method PLAY to the RTSP server
func (s *Client) Play() (*Response, error) {
return s.writeRequest(s.url, play, func(req *Request) { req.Header.Add("Client", s.Client) }, nil)
return s.writeRequest(s.url, play, nil, nil)
}
// writeRequest creates an RTSP request of the method given and writes it to the