sending data from one file descriptor to many

sending data from one file descriptor to many

Post by virtualsmas.. » Tue, 10 Aug 1999 04:00:00



I'm writing an application, where I'll need to read from one socket and
distribute that data to many others.  Is there a built-in way to do
this?  I want to avoid reading into a buffer, then looping through the
descriptors.

Jon

Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.

 
 
 

sending data from one file descriptor to many

Post by Alex Versta » Wed, 11 Aug 1999 04:00:00




> I'm writing an application, where I'll need to read from one socket
and
> distribute that data to many others.  Is there a built-in way to do
> this?  I want to avoid reading into a buffer, then looping through the
> descriptors.

Have you considered multicast (or even broadcast)?

=Alex

Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.

 
 
 

sending data from one file descriptor to many

Post by Jason A. Quijan » Wed, 11 Aug 1999 04:00:00


Check out my server code at:
http://www.ecst.csuchico.edu/~jquijano/chat/source/server0.0.5.c

The idea is to have a server keep track of client connections with
some type of data structure. (link list, tree or even a simple array)
Clients send data to the server only, the server then traverses the
data structure sending to each nodes socket.


Quote:> I'm writing an application, where I'll need to read from one socket and
> distribute that data to many others.  Is there a built-in way to do
> this?  I want to avoid reading into a buffer, then looping through the
> descriptors.

> Jon

> Sent via Deja.com http://www.deja.com/
> Share what you know. Learn what you don't.