 
 	@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)
+		//		onSocketError?(code: code, reason: reason, wasClean: wasClean, error: error)
 	}
 }

import SwiftWebSocket
import Wrap

public typealias SocketState = WebSocketReadyState

public final class Socket {
	public private(set) var socket: WebSocket?
	public let heartbeatInterval: NSTimeInterval
	public let url: NSURL
	public var reconnectOnError = true

	private var heartBeatTimer: NSTimer?
	private var reconnectTimer: NSTimer?

		socket = WebSocket(url: url.urlByAppendingQueryItems(params) ?? url)
		socket?.delegate = self
		socket?.open()
	}

	public func reconnect() {
