mirror of
https://github.com/aler9/gortsplib
synced 2025-10-05 07:06:58 +08:00
rename Read / Write into Unmarshal / Marshal when needed
Read() / Write() are used to read / write from streams, while Unmarshal() / Marshal() are used to decode / encode from / to bytes.
This commit is contained in:
@@ -428,7 +428,7 @@ func (sc *ServerConn) handleRequest(req *base.Request) (*base.Response, error) {
|
||||
}
|
||||
|
||||
if stream != nil {
|
||||
res.Body = stream.Tracks().Write(multicast)
|
||||
res.Body = stream.Tracks().Marshal(multicast)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -543,7 +543,7 @@ func (sc *ServerConn) handleRequestOuter(req *base.Request) error {
|
||||
h.OnResponse(sc, res)
|
||||
}
|
||||
|
||||
byts, _ := res.Write()
|
||||
byts, _ := res.Marshal()
|
||||
|
||||
sc.conn.SetWriteDeadline(time.Now().Add(sc.s.WriteTimeout))
|
||||
sc.conn.Write(byts)
|
||||
|
Reference in New Issue
Block a user