Ejemplo n.º 1
0
 /// <summary>
 ///  Creates a new Aeron source with the specified parameters.
 /// </summary>
 /// <param name="aeron">the Aeron connection to use</param>
 /// <param name="stream">the Aeron stream ID to use</param>
 /// <param name="channel">the Aeron channel to use</param>
 /// <param name="bufferSize">the data buffer size to use (in bytes)</param>
 public Source(Aeron aeron, int stream, string channel, int bufferSize)
 {
     _stream      = stream;
     _channel     = channel;
     _buffer      = new UnsafeBuffer(BufferUtil.AllocateDirectAligned(bufferSize, BitUtil.CACHE_LINE_LENGTH));
     _publication = aeron.AddPublication(_channel, _stream);
 }