 		socket = WebSocket(url: url.urlByAppendingQueryItems(params) ?? url)
 		socket?.delegate = self
 		socket?.open()
-		socket?.readyState
 	}
 
 	public func reconnect() {


	@objc public func webSocketEnd(code: Int, reason: String, wasClean: Bool, error: NSError?) {
		// close and error handled here.
//		onSocketError?(code: code, reason: reason, wasClean: wasClean, error: error)
	}
}

	private var lastParams: [NSURLQueryItem]?
	private let queue = NSOperationQueue()

	public init(url: NSURL, heartbeatInterval: NSTimeInterval = 0.0, reconnectInterval: NSTimeInterval = 5.0) {
		self.url = url
		self.heartbeatInterval = heartbeatInterval
		self.reconnectInterval = reconnectInterval

		queue.suspended = true
	}
