HTML and CSS Reference
In-Depth Information
- (void)didReceiveBinaryMessage:(NSData
// JavaScript event: onmessage
4. It is now time to populate the methods, as we did in the JavaScript samples.
Here's what you need to do in order to set the app up and running:
// ViewController.h
@interface ViewController :
UIViewController <WebSocketDelegate>
// Create a new WebSocket object.
WebSocket *socket;
// ViewController.m
- (void)viewDidLoad
[super viewDidLoad];
// Specify the WebSocket configuration.
The only necessary parameter is the URL.
WebSocketConnectConfig *config =
origin:nil protocols:nil
tlsSettings:nil headers:nil
Search WWH ::

Custom Search