Get connected service name using NSStream's and Bonjour based NSNetServices peer to peer
Asked Answered
I

0

7

I have a problem with obtaining a connected service name on the other device. I am using NSNetServices based on Bonjour and input and output streams for peer to peer connections. I have an iPhone and iPad device. When I try to connect to the iPad from iPhone, on the iPhone side the delegate callback:

- (void)netService:(NSNetService *)sender didAcceptConnectionWithInputStream:(NSInputStream *)inputStream outputStream:(NSOutputStream *)outputStream

gets called. But the sender is just it's own service (iPhone), so it gives me no information. I thought that it should contain the other device service (iPad), so we can save information to what service we are connected to. Do you know how can I get the connected service name?

Iorio answered 9/3, 2015 at 11:27 Comment(1)
yeah, I have the same problem tooSemicircle

© 2022 - 2024 — McMap. All rights reserved.