mirror of
https://github.com/aler9/gortsplib
synced 2025-10-06 07:37:07 +08:00
use a single TCP outgoing buffer each client / session (#665)
this saves memory.
This commit is contained in:
@@ -67,9 +67,9 @@ func (h *serverMulticastWriter) ip() net.IP {
|
||||
return h.rtpl.ip()
|
||||
}
|
||||
|
||||
func (h *serverMulticastWriter) writePacketRTP(payload []byte) error {
|
||||
func (h *serverMulticastWriter) writePacketRTP(byts []byte) error {
|
||||
ok := h.writer.push(func() error {
|
||||
return h.rtpl.write(payload, h.rtpAddr)
|
||||
return h.rtpl.write(byts, h.rtpAddr)
|
||||
})
|
||||
if !ok {
|
||||
return liberrors.ErrServerWriteQueueFull{}
|
||||
@@ -78,9 +78,9 @@ func (h *serverMulticastWriter) writePacketRTP(payload []byte) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (h *serverMulticastWriter) writePacketRTCP(payload []byte) error {
|
||||
func (h *serverMulticastWriter) writePacketRTCP(byts []byte) error {
|
||||
ok := h.writer.push(func() error {
|
||||
return h.rtcpl.write(payload, h.rtcpAddr)
|
||||
return h.rtcpl.write(byts, h.rtcpAddr)
|
||||
})
|
||||
if !ok {
|
||||
return liberrors.ErrServerWriteQueueFull{}
|
||||
|
Reference in New Issue
Block a user