public SocketConsumer(Socket socket, ByteRingBuffer ringBuffer, CancellationToken cancellationToken, int index) { _socket = socket; _ringBuffer = ringBuffer; _cancellationToken = cancellationToken; ThreadFactory.CreateBackgroundThread(WriteSocketFromRingBuffer, "SocketConsumer_" + index); }
public SocketProducer(Socket socket, ByteRingBuffer ringBuffer, CancellationToken cancellationToken, int index) { _socket = socket; _ringBuffer = ringBuffer; _cancellationToken = cancellationToken; ThreadFactory.BackgroundThread(ReadSocketIntoRingBuffer, "SocketProducer_" + index); }