Re: [OT] finding client's port

Discussion in 'C Programming' started by Michel Bardiaux, Jul 17, 2003.

  1. Andre wrote:
    > Hi,
    >
    > Please help me! How can I find out a clients port number in unix C
    > programming once a connection is established? I know how to get their
    > address, but how do I find out what port the client will receive data
    > in? Thanks!
    >
    > Andre
    >

    getpeername

    --
    Michel Bardiaux
    Peaktime Belgium S.A. Bd. du Souverain, 191 B-1160 Bruxelles
    Tel : +32 2 790.29.41
     
    Michel Bardiaux, Jul 17, 2003
    #1
    1. Advertising

  2. Joona I Palaste wrote:
    > Michel Bardiaux <> scribbled the following
    > on comp.lang.c:
    >
    >>Andre wrote:
    >>
    >>>Hi,
    >>>
    >>>Please help me! How can I find out a clients port number in unix C
    >>>programming once a connection is established? I know how to get their
    >>>address, but how do I find out what port the client will receive data
    >>>in? Thanks!
    >>>
    >>>Andre
    >>>

    >>
    >>getpeername

    >
    >
    > Please point out which part of the C or C++ standards defines
    > getpeername.
    >

    POSIX

    --
    Michel Bardiaux
    Peaktime Belgium S.A. Bd. du Souverain, 191 B-1160 Bruxelles
    Tel : +32 2 790.29.41
     
    Michel Bardiaux, Jul 18, 2003
    #2
    1. Advertising

  3. Michel Bardiaux

    Dan Pop Guest

    In <> Michel Bardiaux <> writes:


    >
    >Joona I Palaste wrote:
    >> Michel Bardiaux <> scribbled the following
    >> on comp.lang.c:
    >>
    >>>Andre wrote:
    >>>
    >>>>Hi,
    >>>>
    >>>>Please help me! How can I find out a clients port number in unix C
    >>>>programming once a connection is established? I know how to get their
    >>>>address, but how do I find out what port the client will receive data
    >>>>in? Thanks!
    >>>>
    >>>>Andre
    >>>>
    >>>
    >>>getpeername

    >>
    >>
    >> Please point out which part of the C or C++ standards defines
    >> getpeername.
    >>

    >POSIX


    When did POSIX get included in the C and/or the C++ standard?

    Dan
    --
    Dan Pop
    DESY Zeuthen, RZ group
    Email:
     
    Dan Pop, Jul 18, 2003
    #3
  4. Michel Bardiaux

    Jim Fischer Guest

    Michel Bardiaux wrote:
    >
    >
    > Joona I Palaste wrote:
    >
    >> Michel Bardiaux <> scribbled the following
    >> on comp.lang.c:
    >>
    >>> Andre wrote:
    >>>
    >>>> Hi,
    >>>>
    >>>> Please help me! How can I find out a clients port number in unix C
    >>>> programming once a connection is established? I know how to get
    >>>> their address, but how do I find out what port the client will
    >>>> receive data in? Thanks!
    >>>>
    >>>> Andre
    >>>>
    >>>
    >>> getpeername

    >>
    >>
    >>
    >> Please point out which part of the C or C++ standards defines
    >> getpeername.
    >>

    > POSIX
    >


    FWIW, the 'POSIX' standard is defined by IEEE, and not by the ISO/IEC
    standards that define the C/C++ programming languages. Since the C/C++
    language groups on Usenet are typically limited in scope to the C/C++
    languages as they are defined by their respective ISO/IEC standards,
    your best bet would be to ask UNIX socket programming questions in a
    UNIX programming newsgroup. The people in that newsgroup should be able
    to help you with UNIX- and/or POSIX-specific stuff. (Likewise, Mac OS-9
    socket programming is not defined by the ISO/IEC C++ standards. So for
    help with Mac OS-9 socket programming HOWTOs, the best place to ask such
    questions would be the Mac OS-9 programming newsgroups, etc.)

    --
    Jim

    To reply by email, remove "link" and change "now.here" to "yahoo"
    jfischer_link5809{at}now.here.com
     
    Jim Fischer, Jul 18, 2003
    #4
  5. Michel Bardiaux

    Dan Pop Guest

    In <> Michel Bardiaux <> writes:

    >POSIX is not a blood relative of ISO-C; but ISO-C should be proud to be
    >its foster parent, esp. since there is no newsgroup dedicated to POSIX.


    POSIX is considered topical on comp.unix.programmer, even if the
    newsgroup is not restricted to POSIX.

    Dan
    --
    Dan Pop
    DESY Zeuthen, RZ group
    Email:
     
    Dan Pop, Jul 22, 2003
    #5
    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 T. Goodman

    Overhead of 4-port over 2-port SRAM

    John T. Goodman, Jan 25, 2005, in forum: VHDL
    Replies:
    0
    Views:
    656
    John T. Goodman
    Jan 25, 2005
  2. Sean Wolfe
    Replies:
    1
    Views:
    2,313
    Joerg Jooss
    Apr 28, 2005
  3. b3ny
    Replies:
    11
    Views:
    958
    Babu Kalakrishnan
    Nov 20, 2004
  4. Michel Bardiaux

    Re: [OT] finding client's port

    Michel Bardiaux, Jul 18, 2003, in forum: C++
    Replies:
    3
    Views:
    348
    Dan Pop
    Jul 22, 2003
  5. Gerald Klix
    Replies:
    0
    Views:
    1,325
    Gerald Klix
    Oct 26, 2005
Loading...

Share This Page