Guest User

Untitled

a guest
Jul 18th, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.21 KB | None | 0 0
  1. def send_object(o)
  2. chunks = @encoder.encode(o)
  3. send_one_chunk = proc{
  4. if chunk = chunks.get_chunk
  5. send_data(chunk)
  6. EM.next_tick(send_one_chunk)
  7. end
  8. }
  9. send_one_chunk.call
  10. end
Add Comment
Please, Sign In to add comment