Your best bet is probably to use a database to track who's currently got an open connection and their reply channel, and then use database rows to match pairs together (in another table).
Your message received code can then look up the other side in the table and forward it to that reply channel. I don't think groups would help too much here. Andrew On 14 Jan 2017 12:41, "Nikoleta Misheva" <nithe...@gmail.com> wrote: > Hello fellows, I started to go into channels and I saw the example for > multiplex chat but it is not excactly what I want and I will be happy if > someone can point me in the right direction or show me an example. > So I want to have many dynamically created rooms than will be destroyed > after the session which the multiplexing example here > <https://github.com/andrewgodwin/channels-examples/tree/master/multichat> > takes > care of. But want I specifically want to do is to have only 2 people in a > room randomly matched and connected. > > *Here is an example: * > User1 clicks a button and user2 clicks the button too and so they are in > something like a list with people that are online, then I randomly pick the > 2 of them to connect to each other in a private room only for them which > will be destroyed when they left > > Thank you in advance > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to django-users+unsubscr...@googlegroups.com. > To post to this group, send email to django-users@googlegroups.com. > Visit this group at https://groups.google.com/group/django-users. > To view this discussion on the web visit https://groups.google.com/d/ > msgid/django-users/fae01772-7a30-4552-a104-0e5f519733de%40googlegroups.com > <https://groups.google.com/d/msgid/django-users/fae01772-7a30-4552-a104-0e5f519733de%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at https://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAFwN1urpkFfJy8_6ofn%2BuQbU-PwB-ha0Z9MJcQbkjm9hK_6-BA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.