session.maxPendingDatagrams
- 类型:<number>
- 默认:
128
可以排队发送的数据报的最大数量。当调用 sendDatagram() 时,数据报会被排队,并由数据包序列化循环与流数据一起机会性发送。当队列已满时,sessionOptions.datagramDropPolicy 决定丢弃最旧的数据报还是最新的数据报。被丢弃的数据报会通过 ondatagramstatus 回调报告为丢失。
🌐 The maximum number of datagrams that can be queued for sending. Datagrams
are queued when sendDatagram() is called and sent opportunistically
alongside stream data by the packet serialization loop. When the queue
is full, the sessionOptions.datagramDropPolicy determines whether
the oldest or newest datagram is dropped. Dropped datagrams are reported
as lost via the ondatagramstatus callback.
此属性可以动态更改,以根据应用活动或内存压力调整队列容量。有效范围是 0 到 65535。
🌐 This property can be changed dynamically to adjust queue capacity
based on application activity or memory pressure. The valid range
is 0 to 65535.