internal ClientConnector( IClientConnector <BufferPool.ConstBuffer, BufferPool.ConstBuffer> impl, Func <IComponent, Serializer> serializerMaker) : base(impl) { _serializerMaker = serializerMaker; }
public SLPClientConnector( INameResolverFactory <IAsymetricCrypt> asymetricCryptFactory, ISymetricCrypt symetric, ISerializerFactory serializeT, ILogger logger, IHash hash, IPersistentPrivateKeyProvider persistentPrivateKeyProvider, ICompression compression, ISecureProtocolHandshake secureProtocolHandshake, IClientConnector clientConnector, IOptions <SLJPOption> sljpOptions = null ) { this.asymetricForDecrypt = asymetricCryptFactory.Resolve(); this.asymetricToEncrypt = asymetricCryptFactory.Resolve(); this.firstAsymetricHandshakeToDecrypt = asymetricCryptFactory.Resolve(); this.firstAsymetricHandshakeToEncrypt = asymetricCryptFactory.Resolve(); this.textPlainTCPChannel = clientConnector; this.symetric = symetric; this.serializeT = serializeT.Resolve(SerializerType.Json); this.logger = logger; this.hash = hash; this.IPersistentPrivateKeyProvider = persistentPrivateKeyProvider; this.compression = compression; this.secureProtocolHandshake = secureProtocolHandshake; var SecurityMaxSizeToReceive = sljpOptions.Value.SecurityMaxSizeToReceive; this.sljpOptions = sljpOptions.Value ?? new SLJPOption(); }
public IClientConnector Start(IApplication application) { var port = PortFinder.FindPort(5000); _application = application; BaseAddress = "http://localhost:" + port; var webSockets = new WebSocketsHandler(); _commands = new CommandRunner(application); Client = new ClientConnector(webSockets, _commands.HandleJson) { WebSocketsAddress = $"ws://127.0.0.1:{port}" }; startWebServer(port, webSockets); #if DEBUG _watcher = new AssetFileWatcher(Client); _watcher.Start(); #endif return Client; }
public IClientConnector Start(IApplication application) { var port = PortFinder.FindPort(5000); _application = application; BaseAddress = "http://localhost:" + port; var webSockets = new WebSocketsHandler(); _commands = new CommandRunner(application); Client = new ClientConnector(webSockets, _commands.HandleJson) { WebSocketsAddress = $"ws://127.0.0.1:{port}" }; startWebServer(port, webSockets); #if DEBUG _watcher = new AssetFileWatcher(Client); _watcher.Start(_input); #endif return(Client); }
public IClientConnector Start(IApplication application, WebApplicationConfiguration additionalConfiguration = null) { var port = additionalConfiguration?.Port ?? PortFinder.FindPort(5000); var hostname = additionalConfiguration?.Hostname ?? "localhost"; _application = application; BaseAddress = $"http://{hostname}:{port}"; var webSockets = new WebSocketsHandler(); _commands = new CommandRunner(application); Client = new ClientConnector(webSockets, _commands.HandleJson) { WebSocketsAddress = $"ws://{hostname}:{port}" }; startWebServer(hostname, port, webSockets); #if DEBUG _watcher = new AssetFileWatcher(Client); _watcher.Start(_input); #endif return(Client); }
public Client(IClientConnector connector , ITcpClient tcpClient ) { this.connector = connector; this.tcpClient = tcpClient; }
public HomeEndpoint(IClientConnector connector, StorytellerContext context, IPersistenceController persistence, IApplicationFiles files) { _connector = connector; _context = context; _persistence = persistence; _files = files; }
public AssetFileWatcher(IClientConnector connector) { _connector = connector; _watcher = new FileChangeWatcher(FindRootFolder(), FileSet.Shallow("bundle.js"), this); _watcherAssets = new FileChangeWatcher(FindClientFolder().AppendPath("public"), FileSet.Everything(), this); }
private void EnsureClient() { if (m_WsDualClient == null || m_WsDualClient.Factory.State != CommunicationState.Opened) { m_WsDualClient = new WsDualClient(MyClients.CurrentBinding, this); client = m_WsDualClient.ClientConnector; } }
public async Task <IClientConnector> Accept() { var socket = await this.tcpListener.AcceptSocketAsync(); IClientConnector tcpClient = this.clientConnectorFactory.Create(socket); return(tcpClient); }
// ENDSAMPLE public AssetFileWatcher(IClientConnector connector) { _connector = connector; var path = Directory.GetCurrentDirectory().AppendPath("bundle.js"); _watcher = new FileChangeWatcher(path.ParentDirectory(), FileSet.Shallow("bundle.js"), this); }
public PersistenceController(ILogger logger, IClientConnector client, ISpecFileWatcher watcher, ISystemTime systemTime) { _logger = logger; _client = client; _watcher = watcher; _systemTime = systemTime; }
// ENDSAMPLE public AssetFileWatcher(IAssetFinder finder, IClientConnector connector) { _connector = connector; var asset = finder.FindAsset("bundle.js"); var path = asset.File.Path; _watcher = new FileChangeWatcher(path.ParentDirectory(), FileSet.Shallow("bundle.js"), this); }
public ConnectionClient(IClientConnector connector) { if (connector == null) throw new ArgumentNullException("connector"); Connector = connector; Processor = connector.CreateProcessor(); OwnsConnector = false; }
public HomeEndpoint(IClientConnector connector, StorytellerContext context, FubuHtmlDocument document, IPersistenceController persistence, IAssetTagBuilder tags, IFubuApplicationFiles files) { _connector = connector; _context = context; _document = document; _persistence = persistence; _tags = tags; _files = files; }
public Client(string ip, int port, IServerDataReceiver receiver, IClientConnector connector, ILogger logger) { this.isReady = IPAddress.TryParse(ip, out host); this.isConnected = false; this.port = port; this.receiver = receiver; this.connector = connector; this.logger = logger; }
public AvailableServersViewModel(IClientConnector connector, IFCWebServiceProvider webServiceProvider, FCClientNetworkData clientNetworkData, MulticastReceiver multicastReceiver) { _clientConnector = connector; _webServiceProvider = webServiceProvider; _availableServers = new List <ServerInfo>(); this.ClientNetworkData = clientNetworkData; ClientNetworkData.AuthorizationToken = _webServiceProvider.Authorize("abc", "def").Result; _multicastReceiver = multicastReceiver; }
public ConnectionClient(IClientConnector connector, DeveelDbConnectionStringBuilder settings) { if (connector == null) throw new ArgumentNullException("connector"); Settings = settings; Connector = connector; Processor = connector.CreateProcessor(); OwnsConnector = false; }
public Engine() { _clientConnector = null; _jobs = new Dictionary <int, IJob>(); _cts = new CancellationTokenSource(); _haveWork = new ManualResetEvent(false); WaitDuration = DefaultWaitDuration; _nextJobId = 0; _nextJobPtr = 0; }
public ConnectionClient(IClientConnector connector, DeveelDbConnectionStringBuilder settings) { if (connector == null) { throw new ArgumentNullException("connector"); } Settings = settings; Connector = connector; Processor = connector.CreateProcessor(); OwnsConnector = false; }
public ClientProxyConnector( IClientConnectorFactoryProducer clientConnectorFactoryProducer, IOptions <ProxyOptions> proxyOptions, ILogger logger ) { this.clientConnector = clientConnectorFactoryProducer.CreateClient(ConnectorFactory.TransmissionControlProtocol) .Create(); this.proxyOptions = proxyOptions.Value; this.logger = logger; }
public void Start(IClientConnector clientConnector) { _clientConnector = clientConnector; Task.Run(() => SendProcessor(_sendQueue, _cts.Token), _cts.Token); _subJobProcessors = new SubJobProcessor[NUMBER_OF_SUB_PROCESSORS]; for (int wpCntr = 0; wpCntr < NUMBER_OF_SUB_PROCESSORS; wpCntr++) { _subJobProcessors[wpCntr] = new SubJobProcessor(_workQueue, _sendQueue); _subJobProcessors[wpCntr].Start(); } Task.Run(() => QueueWork(_workQueue, _cts.Token), _cts.Token); }
public async Task <IClientConnector> Accept() { var socket = await tcpServer.Accept(); IClientConnector secureClient = clientConnectorFactoryProducer .CreateClient(ConnectorFactory.SecureLitleProtocol) .Create(socket); try { //Receive PublicKey And Send Their PublicKey secureClient.Receive(aLittleBuffer, 0, aLittleBuffer.Length); } catch (NetXP.NetStandard.Network.LittleJsonProtocol.SLPException) { secureClient?.Disconnect(); throw; } return(secureClient); }
static void Main(string[] args) { _engine = new Engine(); _coordsMath = new CoordsMath(); _curCoords = GetInitialCoords(); IClientConnector clientConnector = null; _engine.Start(clientConnector); Console.Write("Enter Command: "); string com = Console.ReadLine(); com = com.ToLower().Trim(); while (com != "quit") { Request request = ParseCom(com); if (request == null) { Console.WriteLine("Command not recognized."); } else { ProcessRequest(request); } Console.Write("Enter Command: "); com = Console.ReadLine(); } Console.WriteLine("Quitting, press return key to exit."); _engine.Stop(); Console.Read(); }
internal DeveelDbConnection(IClientConnector connector) { Client = new ConnectionClient(connector); RowCache = new LocalRowCache(this); }
public ClientConnectorActivator(IClientConnector connector, IRemoteController controller) { _connector = connector; _controller = controller; }
public FixtureController(IClientConnector client, IFixtureFileWatcher watcher) { _client = client; _watcher = watcher; }
internal DeveelDbConnection(IClientConnector connector, DeveelDbConnectionStringBuilder settings) { Client = new ConnectionClient(connector,settings); connectionString = settings; RowCache = new LocalRowCache(this); }
public PersistenceController(IClientConnector client, ISpecFileWatcher watcher, IFixtureController fixtures) { _client = client; _watcher = watcher; _fixtures = fixtures; }
internal DeveelDbConnection(IClientConnector connector, DeveelDbConnectionStringBuilder settings) : this(settings) { Client = new ConnectionClient(connector, settings); }
// ENDSAMPLE public AssetFileWatcher(IAssetFinder finder, IClientConnector connector) { _finder = finder; _connector = connector; }
internal DeveelDbConnection(IClientConnector connector, DeveelDbConnectionStringBuilder settings) : this(settings) { Client = new ConnectionClient(connector,settings); }
public HomeEndpoint(IClientConnector connector, StorytellerContext context, IPersistenceController persistence) { _connector = connector; _context = context; _persistence = persistence; }
public PersistenceController(IClientConnector client, ISpecFileWatcher watcher) { _client = client; _watcher = watcher; }
IClientAccessor <Request, Response> ITransport <Request, Response> .ConnectClient( string name, bool async, TimeSpan timeout, IClientConnector <Request, Response> connector) { return(ConnectClient(name, async, timeout, connector as ClientConnector)); }