Beispiel #1
0
 public EndpointContext(FrontEndConnection connection, PacketTransmitter packetTransmitter)
 {
     _connection = connection;
     connection.Disconnected += HandleConnectionDisconnected;
     _packetTransmitter = packetTransmitter;
     _packetTransmitter.RequestPacketReceived += OnRequestPacketReceived;
 }
Beispiel #2
0
        public ClientContext(FrontEndConnection connection, PacketTransmitter packetTransmitter)
            : base(connection, packetTransmitter)
        {
            _debugClient = new DebugClient (this);
            _authClient = new AuthenticationClient (this);
            _tpmClient = new TPMClient (this);

            RegisterSubsystem (new TPMClientSubsystem (this));

            _configured = true;
            _configuredEvent.Set ();
        }
Beispiel #3
0
        public ServerContext(FrontEndConnection connection, PacketTransmitter packetTransmitter, IConnectionsConfiguration connectionConfig,
            AccessControlList acl, IDictionary<string, TPMContext> tpmContexts)
            : base(connection, packetTransmitter)
        {
            _accessControlList = acl;
            _tpmContexts = tpmContexts;

            RegisterSubsystem (new DebugSubsystem (this, connectionConfig));
            RegisterSubsystem (new AuthenticationSubsystem (this, connectionConfig));
            RegisterSubsystem (new TPMSubsystem (this, connectionConfig));
            _configured = true;
            _configuredEvent.Set ();
        }
Beispiel #4
0
 /// <summary>
 /// Creates a ServerContext for the specified connection
 /// </summary>
 public static ServerContext CreateServerEndpointContext(FrontEndConnection connection, IConnectionsConfiguration connectionConfig,
     AccessControlList acl, IDictionary<string, TPMContext> tpmContexts)
 {
     PacketTransmitter packetTransmitter = new PacketTransmitter(connection);
     ServerContext ctx = new ServerContext(connection, packetTransmitter, connectionConfig, acl, tpmContexts);
     packetTransmitter.StartTransmitting();
     return ctx;
 }
Beispiel #5
0
 /// <summary>
 /// Creates a ClientContext for the specified connection
 /// </summary>
 public static ClientContext CreateClientEndpointContext(FrontEndConnection connection)
 {
     PacketTransmitter packetTransmitter = new PacketTransmitter(connection);
     ClientContext ctx = new ClientContext(connection, packetTransmitter);
     packetTransmitter.StartTransmitting();
     return ctx;
 }