 			startHeatBeatTimer(timeInterval: timeInterval)
 		}
 
-		onSocketOpen?()
+		onOpen?()
 	}
 
 	private func webSocketDidReceiveMessage(messageStr: String) {

	public let url: NSURL
	public var reconnectOnError = true

	public var onSocketOpen: (() -> Void)?
	public var onSocketError: ((error: NSError) -> Void)?
	public var onSocketClose: ((code: Int, reason: String, wasClean: Bool) -> Void)?
	public var onSocketMessage: ((result: Result<Message>) -> Void)?

	public var socketState: SocketState {
		return socket?.readyState ?? .Closed

				)
			}

			onMessage?(result: .Success(message))
		} catch let error as NSError {
			webSocketDidError(error)
			onMessage?(result: .Failure(error))
		}
	}
	
