public MultiplexTelemetryChannel( IContractSerializer contractSerializer, ProcessTelemetryRequest executeRequestDelegate, ProcessTelemetryEvent handleEventDelegate, ITelemetryStreamConnectionSource connectionSource, ITelemetryStreamConnectionSink connectionSink) : base( contractSerializer, connectionSource, connectionSink,
public TelemetryServer(IPEndPoint listenerEndpoint, ProcessTelemetryRequest processTelemetryRequest, ProcessTelemetryEvent processTelemetryEvent, IContractSerializer contractSerializer) { _processTelemetryRequest = processTelemetryRequest; _processTelemetryEvent = processTelemetryEvent; _contractSerializer = contractSerializer; _packageWrapper = new TelemetryPackageWrapper(contractSerializer); listener = new Socket(listenerEndpoint.AddressFamily, SocketType.Stream, ProtocolType.Tcp); listener.Bind(listenerEndpoint); listener.Listen(Environment.ProcessorCount * 2); incomingConnectionListener = new MultiThreadProcessor(ThreadPriority.Highest, HandleSocketConnection); }
public TelemetryClient(IPEndPoint endPoint, ProcessTelemetryRequest processTelemetryRequest, ProcessTelemetryEvent processTelemetryEvent, IContractSerializer contractSerializer, ITelemetryCryptoProvider cryptoProvider) { _processTelemetryRequest = processTelemetryRequest; _processTelemetryEvent = processTelemetryEvent; _contractSerializer = contractSerializer; _cryptoProvider = cryptoProvider; _endPoint = endPoint; Channel = new MultiplexTelemetryChannel( contractSerializer, processTelemetryRequest, processTelemetryEvent, new MultiplexInputSource(channelResources.GetResource, cryptoProvider), new MultiplexOutputSink(channelResources.GetResource, cryptoProvider)); Connect(); }