If I understand the question, you have a server to which clients connect.
A server can have one of two roles, either the "sender" or "receiver". When a sender and a receiver connect to the server, the sender transmits data which is then passed on to the receiver. This is generically known as a "proxy".
One way to do this is to have the server listen on two different ports, say 3000 and 4000. Clients connecting to port 3000 (for instance) want to assume the role of sender, while those connecting on 4000 want to receive. If you have multiple senders and multiple receivers, then the clients will need to identify themselves to the server and indicate to which receiver they want to send or receive from (by sending login parameters, for instance), prior to setting up the data transfer connections. The details of how this is accomplished (data packets sent) is known as the "protocol", and you are responsible for designing it.
If clients can take on both roles simultaneously (sender and receiver) then you would have a single listening port on the server for all clients. The clients would then have to communicate to the server (by sending data packets) what connection they want to establish. Again, the details of how this happens are totally up to you. You must define the protocol.
Here's a sequence diagram of one (of many) ways to do this:
Client A Server Client B
|----login------>| |
| |<------login-----|
| |-------accept--->|
|<---acccept-----| |
|----data------->| |
| |-------data----->|
. . .
. . .
. . .
Client A login data message says "I am client A, I wish to send data to B"
Client B login data message says "I am client B, I wish to receive from A"
Server sends "accept" messages to both. When A receives the accept message it begins sending data and the server forwards it to B.
Issues to be dealt with include ordering of connections (what if B connects before A), connection failure (how does the server notify one client that the other disappeared), etc. These are all part of defining the protocol.