public void Start(int port, int inPort, int respondePort) { var ip = new IPEndPoint(IPAddress.Parse("235.5.5.11"), inPort); searching = new SearchProtocol(_logger, ip, respondePort, NodeName); searching.IPFound += nodeFound; Task.Run(() => searching.ListenForRequests()); Task.Run(() => searching.ListenForResponses()); _logger.LogMessage("Starting"); _listener = new TcpListener(LocalConfig.GetLocalIP(), port); _listener.Start(); _listening = new Task(ListenConnections); _listening.Start(); }