mirror of
https://github.com/aler9/gortsplib
synced 2025-10-06 07:37:07 +08:00
update docs
This commit is contained in:
@@ -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.
|
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
|
## Links
|
||||||
|
|
||||||
IETF Standard
|
IETF Standard
|
||||||
|
@@ -14,7 +14,8 @@ func md5Hex(in string) string {
|
|||||||
return hex.EncodeToString(h.Sum(nil))
|
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 {
|
type AuthClient struct {
|
||||||
user string
|
user string
|
||||||
pass string
|
pass string
|
||||||
|
@@ -7,7 +7,8 @@ import (
|
|||||||
"net/url"
|
"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 {
|
type AuthServer struct {
|
||||||
nonce string
|
nonce string
|
||||||
realm string
|
realm string
|
||||||
|
13
request.go
13
request.go
@@ -32,9 +32,16 @@ const (
|
|||||||
|
|
||||||
// Request is a RTSP request.
|
// Request is a RTSP request.
|
||||||
type Request struct {
|
type Request struct {
|
||||||
Method Method
|
// request method
|
||||||
Url *url.URL
|
Method Method
|
||||||
Header Header
|
|
||||||
|
// request url
|
||||||
|
Url *url.URL
|
||||||
|
|
||||||
|
// map of header values
|
||||||
|
Header Header
|
||||||
|
|
||||||
|
// optional content
|
||||||
Content []byte
|
Content []byte
|
||||||
}
|
}
|
||||||
|
|
||||||
|
13
response.go
13
response.go
@@ -61,10 +61,17 @@ const (
|
|||||||
|
|
||||||
// Response is a RTSP response.
|
// Response is a RTSP response.
|
||||||
type Response struct {
|
type Response struct {
|
||||||
StatusCode StatusCode
|
// numeric status code
|
||||||
|
StatusCode StatusCode
|
||||||
|
|
||||||
|
// status message
|
||||||
StatusMessage string
|
StatusMessage string
|
||||||
Header Header
|
|
||||||
Content []byte
|
// map of header values
|
||||||
|
Header Header
|
||||||
|
|
||||||
|
// optional content
|
||||||
|
Content []byte
|
||||||
}
|
}
|
||||||
|
|
||||||
func readResponse(br *bufio.Reader) (*Response, error) {
|
func readResponse(br *bufio.Reader) (*Response, error) {
|
||||||
|
Reference in New Issue
Block a user