WebsocketStompKit
WebsocketStompKit copied to clipboard
typos code examples (readme)
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];
}];