Skip to content

Commit f026395

Browse files
committed
why
1 parent 1e1bf5c commit f026395

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
//
2+
// WebSocketChannel.swift
3+
//
4+
//
5+
// Created by gridscale on 2020/05/01.
6+
//
7+
8+
import Foundation
9+
10+
//
11+
public protocol WebSocketChannel: class {
12+
init(url : String)
13+
init(url : URLRequest)
14+
15+
func connect()
16+
func disconnect(closeCode: UInt16)
17+
func send(data: Data)
18+
var receiver: DataReceiver { get set}
19+
}
20+
21+
//
22+
public typealias DataReceiver = (_ data: Data, _ channel: WebSocketChannel) -> Any

0 commit comments

Comments
 (0)