mirror of https://bitbucket.org/ausocean/av.git
protocol/rtsp: Client.session => Client.sessionID
This commit is contained in:
parent
f2b941394b
commit
77094acc67
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue