Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

port number error #14

Closed
furueili opened this issue Jun 23, 2015 · 1 comment
Closed

port number error #14

furueili opened this issue Jun 23, 2015 · 1 comment

Comments

@furueili
Copy link

hi~ In serviceDidResolve delegate method,
I saw the service data as follows
HHService[0x742E3580, MAC000E53290B23, _afpovertcp._tcp, local., MAC000E53290B23.local., (
"192.168.1.48:88"
), 1] - Resolved last address

and I try to print the port number
NSLog(@"service port number :%i",service.lastResolvedPort);
what I got is
service port number :22528

please help thx

@tolo
Copy link
Owner

tolo commented Jun 25, 2015

Hi,

The lastResolvedPort property is an internal property containing a (temporary) port number expressed in network byte order, which is why you get a strange result when you attempt to print it out.

But I've actually just checked in an update to HHService in which I've added new convenience properties, for instance resolvedInetAddresses, which contains a list of resolved addresses on the form IP:PORT.

@tolo tolo closed this as completed Jun 25, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants