braverhealth / phoenix-socket-dart

Cross-platform and stream-based implementation of Phoenix Sockets
https://pub.dev/packages/phoenix_socket
BSD 3-Clause "New" or "Revised" License
73 stars 37 forks source link

How and where do you create socket, join channel and process message? #22

Closed freewebwithme closed 3 years ago

freewebwithme commented 3 years ago

Hi This is not an issue. Sorry for this. But There is no place to ask about. I wonder if you guys where you connect socket? and joining channel and where to process incoming message from channel? In my case, for cart channel, I created it when user log in and register as singleton using GetIt package. So I can get cart channel anywhere where I want it like getIt<PhoenixChannel>();

But in case of order channel, I need to join multiple channel in case of user orders multiple order. in this case, how do you handle this? joinning multiple channel, and get stream message from those.