mirror of https://bitbucket.org/ausocean/av.git
protocol/rtsp: Client.session => Client.sessionID
This commit is contained in:
parent
f2b941394b
commit
77094acc67
|
@ -36,11 +36,11 @@ import (
|
||||||
|
|
||||||
// Client describes an RTSP Client.
|
// Client describes an RTSP Client.
|
||||||
type Client struct {
|
type Client struct {
|
||||||
cSeq int
|
cSeq int
|
||||||
addr string
|
addr string
|
||||||
url *url.URL
|
url *url.URL
|
||||||
conn net.Conn
|
conn net.Conn
|
||||||
session string
|
sessionID string
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewClient returns a pointer to a new Client. The URL u will be parsed and
|
// 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 {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
c.session = resp.Header.Get("Session")
|
c.sessionID = resp.Header.Get("Session")
|
||||||
|
|
||||||
return resp, err
|
return resp, err
|
||||||
}
|
}
|
||||||
|
@ -106,7 +106,7 @@ func (c *Client) Play() (*Response, error) {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
req.Header.Add("Session", c.session)
|
req.Header.Add("Session", c.sessionID)
|
||||||
|
|
||||||
return c.Do(req)
|
return c.Do(req)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue