1 client and multiple server

A

abhi147

Hi ,
I have one client and 4 servers (A,B,C,D) , The client reads
a message from message queue and sends messages to servers so that it
sends the 1st message to server A , then the next message to server B ,
next one to C then D , then again starts the cycle .
Can anyone help me ?

Thanks !
 
K

kulkarni.sunil

Hi ,
I have one client and 4 servers (A,B,C,D) , The client reads
a message from message queue and sends messages to servers so that it
sends the 1st message to server A , then the next message to server B ,
next one to C then D , then again starts the cycle .
Can anyone help me ?

Thanks !

What help do you need? If you want help with iteration logic,
here is some crude example in C

<-- begin: uncompilable, untested crude code snippet -->

void * server_list[4] = {A, B, C, D};
void * message;
unsigned int i = 0;
while (some_condition) {
message = get_one_message_from_client_queue();
send_message_to_server(message, server_list[i % 4]);
i++;
}

<-- end: uncompilable, untested crude code snippet -->
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,280
Latest member
BGBBrock56

Latest Threads

Top