Пример #1
0
 private IMessageConnection MakeMessageConnection(IPrimitiveConnection conn)
 {
     return(new MessageConnection(conn, _commandDecoderFactory));
 }
Пример #2
0
 public void Deconstruct(out string seed, out IPrimitiveConnection connection)
 {
     seed       = Seed;
     connection = Connection;
 }
Пример #3
0
 public SeededPrimitiveConnection(string seed, IPrimitiveConnection connection)
 {
     Seed       = seed;
     Connection = connection;
 }
Пример #4
0
 /// <summary>
 ///     Constructs a <see cref="MessageConnection"/> on top of the given
 ///     BapsNet primitive handlers.
 /// </summary>
 /// <param name="connection">The primitive connection used to receive commands.</param>
 /// <param name="commandDecoderFactory">
 ///     A function that produces command decoders appropriate for the
 ///     role of this connection (client or server).
 /// </param>
 public MessageConnection(IPrimitiveConnection connection, Func <IPrimitiveSource, CancellationToken, CommandDecoder> commandDecoderFactory)
 {
     _receiver = CreateReceiver(connection, commandDecoderFactory);
     _sender   = new Sender(connection);
 }