C# socket 怎样立刻发送消息,而不是关闭socket时在发送

2025-04-30 06:11:48
推荐回答(2个)
回答1:

可以flush吧,close才发,这个.net缓存的机制,减少网络io消耗

回答2:

建议使用异步非阻塞的方式