We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1e1bf5c commit f026395Copy full SHA for f026395
1 file changed
Sources/StompClientKit/WebSocketChannel.swift
@@ -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