Re: Reconnecting to a NetService after a stream error
Re: Reconnecting to a NetService after a stream error
- Subject: Re: Reconnecting to a NetService after a stream error
- From: "Quinn \"The Eskimo!\"" <email@hidden>
- Date: Thu, 04 May 2017 08:45:52 +0100
On 3 May 2017, at 18:20, Marc Krochmal <email@hidden> wrote:
> I'm not sure why you're getting stream errors …
Indeed. I tried this on a test app here in my office and I was able to reconnect just fine.
On 3 May 2017, at 17:38, Jeff Kelley <email@hidden> wrote:
> It seems like I can’t just call getInputStream(_:outputStream:) again on the resolved service, as doing so gives me all kinds of errors about a socket not being available.
Can you post more details about the actual error you’re getting?
> My next thing to try will be to rediscover the service, using its TXT data to make sure it’s the same one, re-resolve the address, and try again.
As Marc noted, you could (and should) avoid that rediscovery by making a copy of the NSNetService.
Share and Enjoy
--
Quinn "The Eskimo!" <http://www.apple.com/developer/>
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden