title: swift, objective-c protocol implementation
body: <p>Still trying to get used to swift, but since my obj-c knowledge is close to 0, I have not been able to implement this SocketRocket protocol. Any help would be greatly appreciated</p>
  
  <p><strong>Here's the obj-c delegate I try to implement</strong></p>
  
  <pre><code>@protocol SRWebSocketDelegate &lt;NSObject&gt;
  
  // message will either be an NSString if the server is using text
  // or NSData if the server is using binary.
  - (void)webSocket:(SRWebSocket *)webSocket didReceiveMessage:(id)message;
  
  @optional
  
  - (void)webSocketDidOpen:(SRWebSocket *)webSocket;
  - (void)webSocket:(SRWebSocket *)webSocket didFailWithError:(NSError *)error;
  - (void)webSocket:(SRWebSocket *)webSocket didCloseWithCode:(NSInteger)code reason:(NSString *)reason wasClean:(BOOL)wasClean;
  
  @end
  </code></pre>
  
  <p><strong>I hoped this was the proper way to implement it; it wasn't...</strong> <br>
  I get <em>'SocketDelegate' does not conform to protocol 'SRWebSocketDelegate'</em></p>
  
  <pre><code>class SocketDelegate:UIViewController, SRWebSocketDelegate{
      let socket:SRWebSocket! = SRWebSocket()
  
      override func loadView() {
          self.socket.delegate = self
      }    
  
      func didReceiveMessage(message:AnyObject){
  
      }
  }
  </code></pre>