设置socket.Receive()的等待时延

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);
   ……
明白?

posted @ 2006-09-01 15:55  小y  阅读(2443)  评论(0编辑  收藏  举报