From: James Edward Gray II Date: 2005-07-18T00:42:17+09:00 Subject: Re: Nonblocking Sockets On Jul 17, 2005, at 12:00 AM, nobu.nokada@softhome.net wrote: > Hi, > > At Sun, 17 Jul 2005 13:10:03 +0900, > James Edward Gray II wrote in [ruby-talk:148440]: > >> So do I need to call it once on each Socket accept() spawns? Will >> once be enough? >> > > Once on each accepted sockets. > > >> What is the nonblocking behavior of accept? Will it throw an >> Exception, return nil, or what? >> > > Errno::EWOULDBLOCK will be raised. Thanks so much for all this information. You've been very helpful and I appreciate it. A couple more questions and then I promise I'm done: 1. Do I then use send() and recvfrom() to write and read data? (Other messages in this thread have me nervous about recvfrom().) 2. Will these also throw Errno::EWOULDBLOCK? Thanks again. James Edward Gray II