jchristn / SuperSimpleTcp

Simple wrapper for TCP client and server in C# with SSL support
MIT License
459 stars 95 forks source link

The server sends messages to all clients on a regular basis #201

Closed FreeVB closed 1 year ago

FreeVB commented 1 year ago

Hello, is there a way for the server to send messages to all clients on a regular basis?

It is an active send, for example, a message with a specified content is sent to all connected clients every 5 seconds.

FreeVB commented 1 year ago

https://github.com/jchristn/SuperSimpleTcp/issues/197 In addition, I found a solution to this: _Server = new SimpleTcpServer("0.0.0.0", 1236)

jchristn commented 1 year ago

Hi @FreeVB you can use the server GetClients() method and then iterate, sending each a message. Broadcast functionality is not built into the library.