Say Client A want to create a SocketServer but not in his phone, is in the outside Server. Then Client B can connect the SocketServer in the outside Server. Then A and B can communicate.
My idea is: Outside Server has a thread keep running to listen Client A request. When it receives client A request. The outside Server open a new SocketServer with new port. Then both client A and client B will both connect to the new SocketServer created by the outside Server. Finally client A and client B can communicate.
Above is just my idea, do you thing that it is possible? You may give me some pseudo codes. Many thanks!
Let me say it in more detailed way. For example, client A want to create a chat room, but client A doesn't want to be a server. So client A sends a message to the outside Server ans ask the outside Server create a chat room for client A. Is it possible to do that? What will be implementation of the outside server?**