You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
528 B
22 lines
528 B
//
|
|
// Engine.swift
|
|
// Starscream
|
|
//
|
|
// Created by Dalton Cherry on 6/15/19.
|
|
// Copyright © 2019 Vluxe. All rights reserved.
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public protocol EngineDelegate: class {
|
|
func didReceive(event: WebSocketEvent)
|
|
}
|
|
|
|
public protocol Engine {
|
|
func register(delegate: EngineDelegate)
|
|
func start(request: URLRequest)
|
|
func stop(closeCode: UInt16)
|
|
func forceStop()
|
|
func write(data: Data, opcode: FrameOpCode, completion: (() -> ())?)
|
|
func write(string: String, completion: (() -> ())?)
|
|
}
|