Socket.Send() 是否允许对传入的IList> 进行修改?
Gather风格的发送调用,比如 Send(IList
如果是后者,那么我就必须对该列表进行写时复制(copy-on-write)或在调用之前对它进行拷贝,因为需要原始列表来理解函数的返回值并安排把剩余的字节发送出去。
解决方案
You should assume the method will not mutate the IList itself, even though the parameter type is IList<T> rather than IReadOnlyList<T>.
站内所有文章版权归属LeftHeroAI导航站,无授权禁止任何主体转载、抄袭、复制内容,亦不得私自架设镜像站点。一经侵权,本站将通过法律途径追责。