private void StartReceiving(IWritableReactiveTable currenciesWire, Dictionary <string, int> columnsToFieldIds, int port) { var endPoint = new IPEndPoint(IPAddress.Loopback, port); var client = new ReactiveTableTcpClient <IWritableReactiveTable>(new ProtobufTableDecoder(), currenciesWire, new ProtobufDecoderState(columnsToFieldIds.InverseUniqueDictionary()), endPoint); _clients.Add(client); client.Start(); }
private void StartReceiving(IWritableReactiveTable wireTable, Dictionary <string, int> columnsToFieldIds, int port, IReactiveTableProcessor <IWritableReactiveTable> decoder) { var endPoint = new IPEndPoint(IPAddress.Loopback, port); var client = new ReactiveTableTcpClient <IWritableReactiveTable>(decoder, wireTable, GetDecoderState(columnsToFieldIds), endPoint); _feedClient = client; try { client.Start(); } catch (Exception ex) { Debug.WriteLine(ex); } }
private void SetupFeedSubscription(IReactiveTable currenciesTable, IReactiveTableProcessor <IReactiveTable> encoder) { var endPoint = new IPEndPoint(IPAddress.Loopback, (int)ServerPorts.BrokerFeedClients); var selectedCurrencies = new FilteredTable( currenciesTable, new DelegatePredicate1 <bool>(BrokerTableDefinition.BrokerClientColumns.ClientSide.Selected, selected => selected)); var client = new ReactiveTableTcpClient <IReactiveTable>(encoder, selectedCurrencies, GetEncoderState(), endPoint); _ccyPairSubscriptionClient = client; try { client.Start(); } catch (Exception ex) { Debug.WriteLine(ex); } }