i am doing a project that will have multiple channels for clients chatting.
Each client will receives message only from the channel that they joined.
I am wondering during the implementation of the server, should i assign each channel to separate/different port?
Because says if i make the server listen to Only ONE port(And all the channels are using that single port), then how am i going to distinguish and decide which message is going to be broadcast and which not to, while using the Networkstream write and read method???
Thank you so much in advance!
Assuming that by channels you mean something like IRC, then you should probably be listening on one port on the server (to make discovery and networking easier) and include in the message itself which channel it belongs to (so that clients can decide whether to display that message or not).