Stream on Unix socket

Discussion in 'C Programming' started by pozz, Mar 25, 2011.

  1. pozz

    pozz Guest

    I don't know if Unix sockets (or named sockets) are C standard. I
    think so, so I post on this ng.

    I need to have a bidirectional communication between two different
    process on the same computer. I'm using named socket with success.

    The protocol is on a text basis and is based on messages with an
    ending newline character (\n).

    Is it possible to have a stream pointer (FILE *) from the socket file
    descriptor so I'll be able to use fprintf() and similar functions?
    pozz, Mar 25, 2011
    #1
    1. Advertising

  2. pozz <> writes:
    > I don't know if Unix sockets (or named sockets) are C standard. I
    > think so, so I post on this ng.


    They aren't. Try comp.unix.programmer.

    [...]

    --
    Keith Thompson (The_Other_Keith) <http://www.ghoti.net/~kst>
    Nokia
    "We must do something. This is something. Therefore, we must do this."
    -- Antony Jay and Jonathan Lynn, "Yes Minister"
    Keith Thompson, Mar 25, 2011
    #2
    1. Advertising

  3. pozz

    Mark Bluemel Guest

    On 03/25/2011 02:53 PM, pozz wrote:
    > I don't know if Unix sockets (or named sockets) are C standard. I
    > think so, so I post on this ng.


    No they're not.

    <Off-topic>
    If you want to work with them, I'd strongly recommend getting your
    hands on a copy of <http://www.kohala.com/start/unpv12e.html>
    </Off-topic>
    Mark Bluemel, Mar 25, 2011
    #3
  4. Mark Bluemel wrote:
    > On 03/25/2011 02:53 PM, pozz wrote:
    >> I don't know if Unix sockets (or named sockets) are C standard. I
    >> think so, so I post on this ng.

    >
    > No they're not.
    >
    > <Off-topic>
    > If you want to work with them, I'd strongly recommend getting your
    > hands on a copy of <http://www.kohala.com/start/unpv12e.html>
    > </Off-topic>


    Great book. I've got it.

    Bill
    Bill Cunningham, Mar 27, 2011
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Laszlo Nagy
    Replies:
    1
    Views:
    4,823
    Mark Wooding
    Jan 27, 2009
  2. Jean-Paul Calderone
    Replies:
    0
    Views:
    966
    Jean-Paul Calderone
    Jan 27, 2009
  3. Laszlo Nagy
    Replies:
    0
    Views:
    545
    Laszlo Nagy
    Feb 1, 2009
  4. Steve Holden
    Replies:
    0
    Views:
    662
    Steve Holden
    Feb 1, 2009
  5. Steve Holden
    Replies:
    1
    Views:
    715
Loading...

Share This Page