From: Ralf Canis Date: 2001-07-24T23:10:52+09:00 Subject: [ruby-talk:18430] nonblocking socket error under windows? Hi, those few lines crash with No buffer space available; the socket cannot be connected - "recvfrom(2)" (Errno::ENOBUFS) under Windows (1.6.4 install-shield version) but work fine with the Linux version. Looks like a call to recv on a nonblocking socket WITHOUT any data to read causes this "bug". - Anybody can confirm this? - Does a method exist to check if there is anything in the input queue without calling recv? (ok, I can catch this exception but there has to be a better solution) ---snip--- require 'fcntl' require 'net/telnet' tn = Net::Telnet.new('Host' => 'hostname goes here') tn.fcntl(Fcntl::F_SETFL, Fcntl::O_NONBLOCK) tn.print("login string\n") loop do data = tn.recv(1024) break if data.empty? puts data end ---snip--- Regards Ralf