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

Returning "Reachable via WiFi" YES even when device at that address is powered off #145

Open
ksoftllc opened this issue Sep 22, 2016 · 1 comment

Comments

@ksoftllc
Copy link

ksoftllc commented Sep 22, 2016

    NSString* aPrinterHost = @"10.1.10.163";
    NSString* aPrinterPort = @"9100";

    struct sockaddr_in aPrinterIP4Address;
    memset((void *)&aPrinterIP4Address, 0, sizeof(aPrinterIP4Address));
    aPrinterIP4Address.sin_family = AF_INET;
    aPrinterIP4Address.sin_port = htons([aPrinterPort intValue]);
    aPrinterIP4Address.sin_addr.s_addr = inet_addr([aPrinterHost UTF8String]);
    aPrinterIP4Address.sin_len = sizeof(aPrinterIP4Address);

    Reachability* aPrinterReachabilityStatus = 
               [Reachability reachabilityWithAddress:&aPrinterIP4Address];

At this point, [aPrinterReachabilityStatus isReachable] returns YES even though that device is powered off. Is this a bug?

@ksoftllc ksoftllc changed the title Returning "Reachable via WiFi" even when device at that address is off Returning "Reachable via WiFi" YES even when device at that address is powered off Nov 15, 2016
@RenderCoder
Copy link

I have same problem...

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