In perl I can do this:
vec(expr, offset, bits)
which is needed in non-blocking socket operations for data read and write
selects.
Is there a Ruby equivalent for this?
If not, anyone have a workaround for what vec() does?
Thanks!
Andy
···
Posted Via Uncensored-News.Com - Still Only $9.95 - http://www.uncensored-news.com
<><><><><><><> The Worlds Uncensored News Source <><><><><><><><>
I also wanted to add, that the vec() command in Perl provides the framework
for doing an FD_SET and FD_ZERO in C … Hope that helps, still not sure
about implementing this in Ruby.
Thanks!
Andy
Andrew Cowan wrote:
···
In perl I can do this:
vec(expr, offset, bits)
which is needed in non-blocking socket operations for data read and write
selects.
Is there a Ruby equivalent for this?
If not, anyone have a workaround for what vec() does?
Thanks!
Andy
Posted Via Uncensored-News.Com - Still Only $9.95 -
http://www.uncensored-news.com
<><><><><><><> The Worlds Uncensored News Source
<><><><><><><><>
Posted Via Uncensored-News.Com - Still Only $9.95 - http://www.uncensored-news.com
<><><><><><><> The Worlds Uncensored News Source <><><><><><><><>
Yukihiro Matsumoto wrote:
Hi,
In perl I can do this:
vec(expr, offset, bits)
which is needed in non-blocking socket operations for data read and write
selects.
Is there a Ruby equivalent for this?
If not, anyone have a workaround for what vec() does?
You can use
IO::select([fd1, fd2, fd3], [fd4, fd5], nil, timeout)
no vec() is needed. But if you really need vec() equivalent, how
about Robert Feldt’s BitVector?
See http://www.ruby-lang.org/en/raa-list.rhtml?name=BitVector.
matz.
Ahh, I will try your suggestion and look into the BitVector extension as
well, thank you!
-Andy
···
In message “Ruby vec() command equivalent?” > on 02/10/04, Andrew Cowan icculus@gmdstudios.com writes:
Posted Via Uncensored-News.Com - Still Only $9.95 - http://www.uncensored-news.com
<><><><><><><> The Worlds Uncensored News Source <><><><><><><><>