diff --git a/README.md b/README.md index 04eb9f92..f247e784 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,10 @@ RTSP 1.0 primitives for the Go programming language. See [rtsp-simple-server](https://github.com/aler9/rtsp-simple-server) and [rtsp-simple-proxy](https://github.com/aler9/rtsp-simple-proxy) for examples on how to use this library. +## Documentation + +https://godoc.org/github.com/aler9/gortsplib + ## Links IETF Standard diff --git a/auth-client.go b/auth-client.go index 9db381e7..70af845e 100644 --- a/auth-client.go +++ b/auth-client.go @@ -14,7 +14,8 @@ func md5Hex(in string) string { return hex.EncodeToString(h.Sum(nil)) } -// AuthClient is an object that helps a client sending its credentials to a server. +// AuthClient is an object that helps a client sending its credentials to a +// server, with the Digest authentication method. type AuthClient struct { user string pass string diff --git a/auth-server.go b/auth-server.go index 9ed2917d..8fc6bc79 100644 --- a/auth-server.go +++ b/auth-server.go @@ -7,7 +7,8 @@ import ( "net/url" ) -// AuthServer is an object that helps a server validating the credentials of a client. +// AuthServer is an object that helps a server validating the credentials of +// a client, sent with the Digest authentication method. type AuthServer struct { nonce string realm string diff --git a/request.go b/request.go index ceaba909..192d6af6 100644 --- a/request.go +++ b/request.go @@ -32,9 +32,16 @@ const ( // Request is a RTSP request. type Request struct { - Method Method - Url *url.URL - Header Header + // request method + Method Method + + // request url + Url *url.URL + + // map of header values + Header Header + + // optional content Content []byte } diff --git a/response.go b/response.go index 0a8bb560..2306d530 100644 --- a/response.go +++ b/response.go @@ -61,10 +61,17 @@ const ( // Response is a RTSP response. type Response struct { - StatusCode StatusCode + // numeric status code + StatusCode StatusCode + + // status message StatusMessage string - Header Header - Content []byte + + // map of header values + Header Header + + // optional content + Content []byte } func readResponse(br *bufio.Reader) (*Response, error) {