Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
可以TcpClient.Available同时调用Write到它的NetworkStream被调用,是线程安全的吗?
TcpClient.Available
Write
NetworkStream
不保证 TcpClient 上的实例方法是线程安全的,如msdn中所述。只有类的公共静态成员才能保证线程安全