     func websocketDidDisconnect(socket: WebSocket, error: NSError?)
     func websocketDidReceiveMessage(socket: WebSocket, text: String)
     func websocketDidReceiveData(socket: WebSocket, data: NSData)
+}
+
+public protocol WebSocketPongDelegate: class {
+    func websocketDidReceivePong(socket: WebSocket)
 }
 
 public class WebSocket : NSObject, NSStreamDelegate {

    }
    
    public weak var delegate: WebSocketDelegate?
    private var url: NSURL
    private var inputStream: NSInputStream?
    private var outputStream: NSOutputStream?

                data = NSData(bytes: UnsafePointer<UInt8>((buffer+offset)), length: Int(len))
            }
            if receivedOpcode == OpCode.Pong.rawValue {
                self.pongDelegate?.websocketDidReceivePong(self)
                let step = Int(offset+numericCast(len))
                let extra = bufferLen-step
                if extra > 0 {
