Sockets- one server and many clients, how do I name all the clients

Sockets- one server and many clients, how do I name all the clients

Post by Jeff Wandli » Wed, 31 Oct 1990 07:32:52




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.

--


 
 
 

Sockets- one server and many clients, how do I name all the clients

Post by Boyd Rober » Thu, 01 Nov 1990 08:11:58



>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.


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

 
 
 

1. Client - Server, Client socket hangs!

My clients hang themselves randomly!

I have a server process running that spews data to a particular port.
The client processes that connect to it simply listen to the data and
do stuff with it (create files, add info to a database). The server
seems to work just fine, and can be verified with a telnet session into
the port, but after a while, and randomly, they hang. Opening a new
telnet session shows that the server is still running, but the client
or the socket between them seems to hang up. I beleive it's a server
setting, not a problem with the code. Perhaps an idle timeout that only
looks at data in one (the quiet) direction, or something like that.

It's running on a Sun E450 running Solaris 2.7.

Can anyone suggest anything?

Sent via Deja.com http://www.deja.com/
Before you buy.

2. Yamaha 4261 under Mandrake 7.0

3. Simple client/server socket program works on one Linux machine, it doesnot work on other machine

4. system monitor

5. Making Linux server sockets connect with Borland C++ builder Client Sockets?

6. ls I/O error lost+foud

7. Connecting two machines:; Client only communicate with server when server continuously pings client.

8. Write-thru or write-back?

9. Sex Change - Making Server as Client and Client as Server

10. PopTop VPN Server can see Win98 client but client can't see server

11. Communication needed between linux server/client to windows client/server

12. Wanted: Fax Server/client for 95 clients w/ Linux server

13. Q: How does one client connect to more than one server?