mirror of
https://github.com/moonlight-stream/moonlight-ios.git
synced 2026-06-17 14:11:35 +00:00
Created new host discovery system
- now store host uuid and mac address - use uuid to check for duplicate hosts - try local and external IPs - pair status is shown - server status is shown - validate host when manually adding
This commit is contained in:
@@ -7,7 +7,8 @@
|
||||
//
|
||||
|
||||
#import "MDNSManager.h"
|
||||
#import "Computer.h"
|
||||
#import "Host.h"
|
||||
#import "DataManager.h"
|
||||
|
||||
@implementation MDNSManager {
|
||||
NSNetServiceBrowser* mDNSBrowser;
|
||||
@@ -46,9 +47,12 @@ static NSString* NV_SERVICE_TYPE = @"_nvstream._tcp";
|
||||
|
||||
- (NSArray*) getFoundHosts {
|
||||
NSMutableArray* hosts = [[NSMutableArray alloc] init];
|
||||
DataManager* dataMan = [[DataManager alloc] init];
|
||||
for (NSNetService* service in services) {
|
||||
if (service.hostName != nil) {
|
||||
[hosts addObject:[[Computer alloc] initWithHost:service]];
|
||||
Host* host = [dataMan createHost];
|
||||
host.address = service.hostName;
|
||||
[hosts addObject:host];
|
||||
}
|
||||
}
|
||||
return hosts;
|
||||
|
||||
Reference in New Issue
Block a user