Ceasless One
2008-May-15 20:54 UTC
[Eventmachine-talk] Accessing variables from a server after it stops
An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/eventmachine-talk/attachments/20080515/9e3762bc/attachment.html>
Roger Pack
2008-May-16 09:11 UTC
[Eventmachine-talk] Accessing variables from a server after it
with your start server, that block is run immediately as the connection is created--before any data has been received, even. On Thu, May 15, 2008 at 9:54 PM, Ceasless One <ethyrnet at yahoo.com> wrote:> Perhaps this is an unusual use case: I am writing dcc chat/send > functionality into my irc bot. In our case, we are not interested in any of > the data as it comes into the server, it''s the totality of that data after > the server shuts down. So, why exactly is it that I can''t simply "return > @input" ? > > module DCC_Chat > receive_data(data) > @input ||= [] > unless data =~ /^EOF/ > @input << data > else > close_connection > EM::stop > return @input > end > end > end > > I can''t seem to get anything out of the block, even if I use an attr_reader > :input and supply a do block with EM::start_server, ala {|dcc| @x > dcc.input}. > > Note: I''m using 0.8.1, still the latest win32 build. > > > > _______________________________________________ > Eventmachine-talk mailing list > Eventmachine-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/eventmachine-talk >