logic understanding for inter client chat server

hello everyone,
i am making chat server in linux using c. i have made programs in which group chat can take place between multiple clients but i am not able to understand how to make 2 particular clients chat with each other. please help!!!

It sounds like a matter of filtering, or spinning off another chat from the first for n members. It is a subset of the same chat, probably in a forked off child that removes excess persons. However, you either need now connections/sockets or some session ID code for the new session spun off. The client needs a new window for each included user's screen, the screen needs some sort of title for identification, and the server needs to support a new session, by multiplexing or new connections on a new port and server instance. I would think one server juggling many sessions would be good. Is it tcp or UDP or ???
UDP Broadcast and MBone Multicast would be really cool, as everyone but the author gets every message, but for a CS not peer system, TCP is probably in use. You could multiplex the existing TCP connection using session codes and let the new screen get the data from the old screen using some IPC until the old screen is ended, then take over the same connection socket. If there are three sessions, and session 1 dies, session 2 needs to feed 3, but if 2 dies, 1 still needs to feed 3. Memory mapped files are a really neat IPC, btw! RAM/Cache speeds and no O/S overhead.