Im working on ARPG genre game with unity and i have been developing server by using vb.net 2010. Im running login , lobby and game sockets on ports 7111-7113 and each socket has own thread. example : When client connects login thread launch new thread and binds this new client data flow trought that.
here is picture to show logic behind my work :
[attachment=14457:TCPServer.jpg]
But now to the my question. How i create channels? I want 16 player limited channels to chat and 8 players to ingame channel.
Think about this: my client send data , packet structure is [ID,DATA] = [0x01 ,"Hello/Channel1"]. Server must check from array or collection where to send this data. We know that i want send it to clients in Channel1. I have thinking about creating multidimensional array OR collection, collection would be nice because i can acces those client's easily.
AND second question.
How i can store channels to collection? I know how to use collection, so im not asking help for that. But im thinking of multidimensional collection , which inculdes variables Object and String. Object stays one of connected client and string has channel name.
could it work ? tell me !
I need some example code. Please help me!