private void ProcessServerCommand(ServerCommand command) { switch (command.ServerCommandType) { case ServerCommandType.RemoveConnection: // Only remove connections if this command didn't originate from the owner if (!command.IsFromSelf(_serverId)) { var connectionId = (string)command.Value; // Remove the connection ConnectionMetadata metadata; if (_connections.TryGetValue(connectionId, out metadata)) { metadata.Connection.End(); RemoveConnection(metadata.Connection); } } break; default: break; } }
private void ProcessServerCommand(ServerCommand command) { switch (command.Type) { case ServerCommandType.RemoveConnection: // Only remove connections if this command didn't originate from the owner if (!command.IsFromSelf(_serverId)) { RemoveConnection((string)command.Value); } break; default: break; } }