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

about observe #14

Open
PlacidoLv opened this issue Apr 2, 2018 · 0 comments
Open

about observe #14

PlacidoLv opened this issue Apr 2, 2018 · 0 comments

Comments

@PlacidoLv
Copy link

- (IBAction)onTapSend:(id)sender {
    [self.textField resignFirstResponder];

    ICoAPMessage *cO = [[ICoAPMessage alloc] initAsRequestConfirmable:YES requestMethod:IC_GET sendToken:YES payload:@""];
    [cO addOption:IC_URI_PATH withValue:@"obs-non"];
    [cO addOption:IC_OBSERVE withValue:@"0"];

    if (!iExchange) {
        iExchange = [[ICoAPExchange alloc] initAndSendRequestWithCoAPMessage:cO toHost:@"wsncoap.org" port:5683 delegate:self];
    }
    else {
        [iExchange sendRequestWithCoAPMessage:cO toHost:@"wsncoap.org" port:5683];
    }

    self.activityIndicator.hidden = NO;
}

This is my method of adding observe. Why can I only receive one reply? What should I set up? Thanks for help

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

1 participant