WebsocketStompKit icon indicating copy to clipboard operation
WebsocketStompKit copied to clipboard

typos code examples (readme)

Open wollodev opened this issue 9 years ago • 0 comments

Here are the correct code snippets (pull requests follows)

NSURL *websocketUrl = [NSURL URLWithString:@"ws://my-great-server.com/websocket"];
STOMPClient *client = [[STOMPClient alloc] initWithURL:websocketUrl webSocketHeaders:nil useHeartbeat:NO];
// connect to the broker
[client connectWithLogin:@"mylogin"
                passcode:@"mypassword"
    completionHandler:^(STOMPFrame *_, NSError *error) {
        if (error) {
            NSLog(@"%@", error);
            return;
        }

        // send a message
        [client sendTo:@"/queue/myqueue" body:@"Hello, iOS!"];
        // and disconnect
        [client disconnect];
}];

wollodev avatar Jan 03 '16 13:01 wollodev