protocol/rtsp: Client.session => Client.sessionID

This commit is contained in:
Saxon 2019-04-26 19:53:08 +09:30
parent f2b941394b
commit 77094acc67
1 changed files with 7 additions and 7 deletions

View File

@ -40,7 +40,7 @@ type Client struct {
addr string
url *url.URL
conn net.Conn
session string
sessionID string
}
// NewClient returns a pointer to a new Client. The URL u will be parsed and
@ -95,7 +95,7 @@ func (c *Client) Setup(track, transport string) (*Response, error) {
if err != nil {
return nil, err
}
c.session = resp.Header.Get("Session")
c.sessionID = resp.Header.Get("Session")
return resp, err
}
@ -106,7 +106,7 @@ func (c *Client) Play() (*Response, error) {
if err != nil {
return nil, err
}
req.Header.Add("Session", c.session)
req.Header.Add("Session", c.sessionID)
return c.Do(req)
}