mirror of https://bitbucket.org/ausocean/av.git
protocol/rtsp: renamed urlStr to addr
This commit is contained in:
parent
cd18d9f5a7
commit
4e98b4d2ea
|
@ -37,16 +37,16 @@ import (
|
|||
|
||||
// Client describes an RTSP Client.
|
||||
type Client struct {
|
||||
cSeq int
|
||||
urlStr string
|
||||
url *url.URL
|
||||
conn net.Conn
|
||||
cSeq int
|
||||
addr string
|
||||
url *url.URL
|
||||
conn net.Conn
|
||||
}
|
||||
|
||||
// NewClient returns a pointer to a new Client. The URL u will be parsed and
|
||||
// a connection to the RTSP server will be made.
|
||||
func NewClient(u string) (*Client, error) {
|
||||
s := &Client{urlStr: u}
|
||||
s := &Client{addr: u}
|
||||
var err error
|
||||
s.url, err = url.Parse(u)
|
||||
if err != nil {
|
||||
|
@ -71,7 +71,7 @@ func (s *Client) Options() (*Response, error) {
|
|||
|
||||
// Setup forms and sends an RTSP request of method SETUP to the RTSP server.
|
||||
func (s *Client) Setup(track, transport string) (*Response, error) {
|
||||
url, err := url.Parse(s.urlStr + "/" + track)
|
||||
url, err := url.Parse(s.addr + "/" + track)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue