Dart.Sockets Namespace > Server Class : Connections Field |
'Declaration Public Connections As List(Of Tcp)
'Usage Dim instance As Server Dim value As List(Of Tcp) value = instance.Connections instance.Connections = value
public List<Tcp> Connections
public: List<Tcp*>* Connections
public: List<Tcp^>^ Connections
When a client connects to the server, a Tcp object representing the connection is added to Connections and the ConnectionsChanged event is raised. When the connection is closed, the connection is removed from Connections and the ConnectionsChanged event is raised again.
Accessing the Connections collection is not thread-safe. Use "lock(server1.Connections)" (C# syntax) to ensure thread safety.