send_data not sending data

58 views
Skip to first unread message

main

unread,
Apr 23, 2013, 6:11:39 PM4/23/13
to eventm...@googlegroups.com
Hi,

I'm working on eventmachine code that writes a binary data to a client. While collecting data in a loop 16384 bytes per loop, for 3 or 4 rounds send_data does not seem to send data if the receive_data function is exited? It works for small amounts of bytes though?

A regular socket with the same data works as expected.

Anybody had an error like this? Want me to post a gist with the code?

Regards
m.

James Tucker

unread,
Apr 27, 2013, 9:15:52 PM4/27/13
to eventm...@googlegroups.com
This is not an error. Data is sent by the reactor when the reactor has control of the stack.

Put another way, you need to return from receive_data before data will be sent.

Spread out processing operations using EM.schedule if necessary.


m.

--
You received this message because you are subscribed to the Google Groups "EventMachine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to eventmachine...@googlegroups.com.
To post to this group, send email to eventm...@googlegroups.com.
Visit this group at http://groups.google.com/group/eventmachine?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

main

unread,
May 7, 2013, 4:42:56 AM5/7/13
to eventm...@googlegroups.com

Hi,

thank you for the suggestion. I was able to track the error down and it was not related to eventmachine itself but with my code. I had an exception which caused an infinte loop and that was why send_data was not sending out data. It works now.

Thank you

Reply all
Reply to author
Forward
0 new messages