Checking if socket is still open?

Discussion in 'C Programming' started by Markus Pitha, May 2, 2005.

  1. Markus Pitha

    Markus Pitha Guest

    Hello,
    I want to try to program a little server.
    I already managed it to send a login message to the connected user, but
    I wonder how it works to get information about the connection itself?
    With this information, I want to close sockets, which are not in use
    anymore (because of quitting by the client).
    What's the usual way of programming things like that? I mean, which
    return value of which command is usually used for things like that?

    I'm using C with Linux.
    Markus Pitha, May 2, 2005
    #1
    1. Advertising

  2. Markus Pitha <> writes:
    > I want to try to program a little server.
    > I already managed it to send a login message to the connected user, but
    > I wonder how it works to get information about the connection itself?
    > With this information, I want to close sockets, which are not in use
    > anymore (because of quitting by the client).
    > What's the usual way of programming things like that? I mean, which
    > return value of which command is usually used for things like that?
    >
    > I'm using C with Linux.


    Standard C has no sockets. Try comp.unix.programmer.

    --
    Keith Thompson (The_Other_Keith) <http://www.ghoti.net/~kst>
    San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
    We must do something. This is something. Therefore, we must do this.
    Keith Thompson, May 2, 2005
    #2
    1. Advertising

  3. On Mon, 02 May 2005 17:05:20 GMT, in comp.lang.c , Markus Pitha
    <> wrote:

    >Hello,
    >I want to try to program a little server.
    >I already managed it to send a login message to the connected user, but
    >I wonder how it works to get information about the connection itself?


    this isnt a C question, but rather a question about how to use
    sockets. Try comp.unix.programmer, as this is much more ontopic there.

    --
    Mark McIntyre
    CLC FAQ <http://www.eskimo.com/~scs/C-faq/top.html>
    CLC readme: <http://www.ungerhu.com/jxh/clc.welcome.txt>

    ----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
    http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
    ----= East and West-Coast Server Farms - Total Privacy via Encryption =----
    Mark McIntyre, May 2, 2005
    #3
    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. John Salerno
    Replies:
    2
    Views:
    1,484
    Nick Vatamaniuc
    Oct 30, 2006
  2. Gordon Beaton
    Replies:
    23
    Views:
    1,924
    Roedy Green
    Sep 23, 2007
  3. Laszlo Nagy
    Replies:
    1
    Views:
    4,761
    Mark Wooding
    Jan 27, 2009
  4. Jean-Paul Calderone
    Replies:
    0
    Views:
    944
    Jean-Paul Calderone
    Jan 27, 2009
  5. Laszlo Nagy
    Replies:
    0
    Views:
    526
    Laszlo Nagy
    Feb 1, 2009
Loading...

Share This Page