public ComandoDetail(ComandoDetailViewModel viewModel) { InitializeComponent(); udpService = new UdpService(); tcpService = new TcpService(); BindingContext = this.viewModel = viewModel; }
public TcpConnection(ITcpService tcpService, ITcpSerializer tcpSerializer, TcpClient socket, SocketStatistic socketStatistic, ISocketLog log, int id) { Id = id; _tcpSerializer = tcpSerializer; _socket = socket; _socketStatistic = socketStatistic; _log = log; TcpService = tcpService; tcpService.SendDataToSocket = SendDataToSocket; _socketStatistic.LastConnectionTime = DateTime.UtcNow; }
public ConsoleHostedService(ILogger <ConsoleHostedService> logger, IMqttService mqttService, ITcpService tcpService, IOptions <AppConfig> appConfig, IApplicationLifetime appLifetime) { _appLifetime = appLifetime; _mqttService = mqttService; _tcpService = tcpService; _appConfig = appConfig; _mqttService.MqttServiceClient.MqttMsgPublishReceived += client_recievedMessage; //_mqttService.MqttServiceClient.ConnectionClosed += MqttServiceClient_ConnectionClosed; _logger = logger; _logger.LogInformation("ConsoleHostedService instance created..."); }
public NovoComando() { InitializeComponent(); udpService = new UdpService(); tcpService = new TcpService(); Comando = new Comando { Send = "@ALTERNAR#", Port = 9999, IP = "192.168.1.250" }; BindingContext = this; }
public TcpConnection( ITcpService tcpService, ITcpSerializer tcpSerializer, TcpClient socket, SocketStatistic socketStatistic, ILogFactory logFactory, int id) { Id = id; _tcpSerializer = tcpSerializer; _socket = socket; _socketStatistic = socketStatistic; _log = logFactory.CreateLog(this); _tcpService = tcpService; tcpService.SendDataToSocket = SendDataToSocket; _socketStatistic.LastConnectionTime = DateTime.UtcNow; }
public ComandoDetail() { InitializeComponent(); Comando = new Comando { Send = "@ALTERNAR", Receive = "Tem alguem ai?" }; udpService = new UdpService(); tcpService = new TcpService(); viewModel = new ComandoDetailViewModel(Comando); BindingContext = viewModel; }
/// <summary> /// Main Application that takes in all the services /// </summary> /// <param name="pipeService">Requires an <see cref="IPipeService" /></param> /// <param name="taskService">Requires an <see cref="ITaskService" /></param> /// <param name="interactiveConsoleService">Requires an <see cref="IInteractiveConsoleService" /></param> /// <param name="loggerService">Requires an <see cref="ILoggerService" /></param> /// <param name="errorProcessingService">Requires an <see cref="IErrorProcessingService" /></param> /// <param name="tcpService">Requires an <see cref="ITcpService" /></param> /// <param name="cmdRunnerService"></param> /// <param name="config">Requires an <see cref="IOptions{TOptions}" /></param> public App(IPipeService pipeService, ITaskService taskService, IInteractiveConsoleService interactiveConsoleService, ILoggerService loggerService, IErrorProcessingService errorProcessingService, ITcpService tcpService, ICmdRunnerService cmdRunnerService, IInterrogatorService interrogatorService, IOptions <AppSettings> config ) { _interactiveConsoleService = interactiveConsoleService; _pipeService = pipeService; _taskService = taskService; _loggerService = loggerService; _errorProcessingService = errorProcessingService; _tcpService = tcpService; _commandRunnerService = cmdRunnerService; _interrogatorService = interrogatorService; _config = config.Value; }
public TcpTransport() { TcpService = new TcpService(); }
///------------------------------------------------------------------------------------------------- /// <summary> Default constructor. </summary> /// /// <remarks> Justin, 7/11/2015. </remarks> ///------------------------------------------------------------------------------------------------- public Form1() { InitializeComponent(); _mTcpService = new TcpService(655568); }
private void btnConnect_Click(object sender, EventArgs e) { _mTcpService = new TcpService(655568); //pass Ip address, port number and form pointer to create a tcp listner and client (tcp server and client) if (!_mTcpService.BeginConnect(tbServerIp.Text, tbServerPort.Text, this)) { //display the error message if not successful MessageBox.Show(_mTcpService.Message); return; } MessageBox.Show(string.Format("Now connected to end point: {0}, port {1}", tbServerIp.Text, tbServerPort.Text)); }
public TcpController(ITcpService tcpService) { _tcpService = tcpService; }