How to handle broadcast message in this type of net server?

hello everyone, so I just started learning Go and I looked around for an example on how to create a simple TCP server. so I tried it and came up with this.

so basically the client can send “message:string1” and the server will return it to the client. but if the client sent “brc:string1”, the server should send that string1 to all other client too. I’m having a hard time figuring out what to do here. any kind of help would be really great.

Thank you everyone, have a nice day!

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.