protocol/rtsp: renamed urlStr to addr

This commit is contained in:
Saxon 2019-04-26 14:08:58 +09:30
parent cd18d9f5a7
commit 4e98b4d2ea
1 changed files with 6 additions and 6 deletions

View File

@ -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
}