Accept incoming connections. This process is analogous to that of making a phone call to a large corporation's toll free number. This company probably has hundreds of lines, but you would not want to try each of them until you finally got through, so the corporation has set up a rotary on their lines to put connections through to the next available phone line. When a connection is accepted on a socket, a new file descriptor is created. The file descriptor is used as an index to an array of structures.
Every client has exactly one unique file descriptor and a slot in the client array.
Each array position holds a structure which contains the handle and current channel number. When the server receives a message packet, it looks through the entire array and retransmits the message to all clients who are subscribed to the channel number that the message came from. It also stores the handle in the client array. Emergency traffic on channel 9 is also sent to all connected clients regardless of what channel they are subscribed to. As stated earlier, the server must have all bytes in the data packet sent or received at once.