io_splice RubyGem user+dev discussion/patches/pulls/bugs/help
 help / color / mirror / code / Atom feed
From: "Iñaki Baz Castillo" <ibc@aliax.net>
To: ruby.io.splice@librelist.com
Subject: Using io_splice for reading from EventMachine TCP socket
Date: Mon, 27 Dec 2010 14:07:17 +0100	[thread overview]
Message-ID: <AANLkTinnL733WK12K6_bBn4hw=ty187kO3OePq-4voxF@mail.gmail.com> (raw)
In-Reply-To: <AANLkTinnL733WK12K6_bBn4hw=ty187kO3OePq-4voxF@mail.gmail.com>

Hi, I posted this question in EventMachine maillist with no success,
so let me try here :)

M EM application (TCP/UDP server) receives messages with long
bodies and I want to copy such bodies into filesystem files. Instead
of using FileUtils.cp or FileUtils.copy_stream (which AFAIK copy the
file in user space) I would like to try io_splice which performs
the copy at kernel level (faster).

My question is: is it possible with EM? I expect I just need the
socket file descriptor in which EM receives the data but the API
provided by EM::Connection doesn't seem to offer such file descriptor.

Thanks a lot.

-- 
Iñaki Baz Castillo
<ibc@aliax.net>

       reply	other threads:[~2010-12-27 13:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-27 13:07 Iñaki Baz Castillo [this message]
2010-12-27 14:17 ` Using io_splice for reading from EventMachine TCP socket Iñaki Baz Castillo
2010-12-27 16:22   ` Eric Wong
2010-12-27 16:58     ` Iñaki Baz Castillo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://yhbt.net/ruby_io_splice/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='AANLkTinnL733WK12K6_bBn4hw=ty187kO3OePq-4voxF@mail.gmail.com' \
    --to=ibc@aliax.net \
    --cc=ruby.io.splice@librelist.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhbt.net/ruby_io_splice.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).