socket编程设置socket.Receive()的等待时间:
    IPEndPoint remohost=new IPEndPoint(IPAddress.Parse("192.168.0.125"),5010);
    Socket s=new Socket(AddressFamily.InterNetwork,SocketType.Dgram,ProtocolType.Udp);
   s.SetSocketOption(SocketOptionLevel.Socket,SocketOptionName.SendTimeout,time_out);
   s.SetSocketOption(SocketOptionLevel.Socket,SocketOptionName.ReceiveTimeout,time_out);
   ……
明白?

相关文章:

  • 2021-09-26
  • 2022-12-23
  • 2021-05-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-24
  • 2021-11-08
猜你喜欢
  • 2021-11-03
  • 2022-12-23
  • 2022-12-23
  • 2021-08-24
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案