[comp.unix.questions] Sockets- one server and many clients, how do I name all the clients

n8743196@unicorn.wwu.edu (Jeff Wandling) (10/30/90)

This is for Mr. Jim Frost of saber.com. (madd@saber.com OR madd@bu_it.bu.edu)
I tried to mail him but it wouldn't go through.

I read your primer and think it is very good! I have a few questions
and I hope you have a few minutes to look at them.

The sample program you gave with the primer works good. I'd also like
to know WHO is connected. In other words, If someone connects, can
your program be modified to show the address of the site that is
connected. 

Even better, if more than one site is connected to that 'socket' I've
created, is there a way to show all the addresses of those connected?
When it does the fork, I seem to loose the ability to record in
any form, the list of connected addresses. (The shared memory has
been copied.)

This may be more a C question than a 'socket' question. But since I'm
new at the latter, I wasn't sure. That's why I asking.

-- 
jeff wandling                             internet: n8743196@unicorn.cs.wwu.edu
cs ugrad @ western washington university             illegitimi non carborundum

boyd@necisa.ho.necisa.oz (Boyd Roberts) (10/31/90)

In article <1990Oct29.223252.14606@unicorn.wwu.edu> n8743196@unicorn.wwu.edu (Jeff Wandling) writes:
>
>The sample program you gave with the primer works good. I'd also like
>to know WHO is connected. In other words, If someone connects, can
>your program be modified to show the address of the site that is
>connected. 

getpeername(3) will tell you who's on the other end.


Boyd Roberts			boyd@necisa.ho.necisa.oz.au

``When the going gets wierd, the weird turn pro...''