socket programming (UDP with multiple clients)

Hi all,

   I have an application where 

there are 5 udp clients/senders which keep sending data to same IP with different port number

can I design my udp server to recieve data from all 5 clients at the same time? how should I use the server address structure? should I use different address structure for each ? am trying to do it using fork() . please guide me how to go with it?

thanks in advance

Are you using UDP for a single-packet query/response protocol? Or will a client send/receive information that is to be reconstructed over several packets?

I have designed my client in such a way that it picks a file present in specified directory and keeps sending that data till end of file and then picks up next file and sends data ,it continues.

I have 5 such clients which keeps sending data to 5 different port numbers.

server has to be designed such it should keep recieving data from corresponding client.

Planing to use fork() and recieve data from all the clients and keep storing

This does not sound like a UDP application. The client must keep track of which portions of the file have been sent, and the server must take care to see that each portion of the file has been received. Then both need some kind of handshake agreement so that the client knows to resend data to the server, or to pause so that the server can finish storing the data (what if the server blocks)?

In short, you're reinventing the wheels of FTP and/or NFS. What makes your application different?