DCCP protocol discussions
 help / color / mirror / Atom feed
From: "Arnaldo Carvalho de Melo" <acme@redhat.com>
To: dccp@vger.kernel.org
Subject: Re: DCCP and GStreamer: File descriptor sharing
Date: Thu, 01 Nov 2007 17:28:58 +0000	[thread overview]
Message-ID: <20071101172858.GH13130@ghostprotocols.net> (raw)
In-Reply-To: <5bc4c4570711010726h5580c72dt59748c57be50b064@mail.gmail.com>

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="windows-1252", Size: 1162 bytes --]

Em Thu, Nov 01, 2007 at 11:26:10AM -0300, Łeandro Sales escreveu:
> Hi all,
>    I want to share a same socket-fd between two process using dccp.
> The gstreamer plugin architecture uses a concept of sink and src (each
> one named element), where sink send and src receive data. In this
> case, one of then connects and inform the file descriptor to the
> other. Then I thought that if I just share the socket_fd the things
> will work, but it didn't. I need something like this:
> 
> On dccp_server_sink_element:
> 
> 1 - sock_fd = socket(...);  // sock_id = 10 (for instance), sink tell
> dccp_server_src_element this value
> 2 - bind(sock_fd);
> 3 - listen(sock_fd);
> 
> On dccp_server_src_element:
> 
> 1 - sock_fd = 10 // for the first version I will just pass this value
> via set property, but after I will use unix_socket (as suggested by
> Arnaldo) to communicate both elements

You _have_ to use unix sockets to pass the fd. fd 10 on one process has
absolutely nothing to do with fd 10 on another process, only if both
were created by the same parent, but from your description it doesn't
seems to be the case.

- Arnaldo

      reply	other threads:[~2007-11-01 17:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-01 14:26 DCCP and GStreamer: File descriptor sharing Łeandro Sales
2007-11-01 17:28 ` Arnaldo Carvalho de Melo [this message]

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

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

  git send-email \
    --in-reply-to=20071101172858.GH13130@ghostprotocols.net \
    --to=acme@redhat.com \
    --cc=dccp@vger.kernel.org \
    /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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox