File tree Expand file tree Collapse file tree 5 files changed +16
-11
lines changed Expand file tree Collapse file tree 5 files changed +16
-11
lines changed Original file line number Diff line number Diff line change @@ -132,7 +132,7 @@ open class PusherConnection: NSObject {
132
132
- parameter channelName: The name of the channel
133
133
*/
134
134
internal func unsubscribe( channelName: String ) {
135
- if let chan = self . channels. find ( name: channelName) , chan. subscribed {
135
+ if let chan = self . channels. find ( name: channelName) , chan. subscribed {
136
136
self . sendEvent ( event: " pusher:unsubscribe " ,
137
137
data: [
138
138
" channel " : channelName
Original file line number Diff line number Diff line change @@ -41,9 +41,9 @@ open class GlobalChannel: PusherChannel {
41
41
/**
42
42
Calls the appropriate callbacks for the given event name in the scope of the global channel
43
43
44
- - parameter name: The name of the received event
45
- - parameter data: The data associated with the received message
46
- */
44
+ - parameter name: The name of the received event
45
+ - parameter data: The data associated with the received message
46
+ */
47
47
internal func handleErrorEvent( name: String , data: [ String : AnyObject ] ) {
48
48
for (_, callback) in self . globalCallbacks {
49
49
callback ( [ " event " : name, " data " : data] )
Original file line number Diff line number Diff line change @@ -49,13 +49,13 @@ let CLIENT_NAME = "pusher-websocket-swift"
49
49
50
50
#if os(tvOS)
51
51
/**
52
- Initializes the Pusher client with an app key and any appropriate options.
52
+ Initializes the Pusher client with an app key and any appropriate options.
53
53
54
- - parameter key: The Pusher app key
55
- - parameter options: An optional collection of options
54
+ - parameter key: The Pusher app key
55
+ - parameter options: An optional collection of options
56
56
57
- - returns: A new Pusher client instance
58
- */
57
+ - returns: A new Pusher client instance
58
+ */
59
59
public init ( key: String , options: PusherClientOptions = PusherClientOptions ( ) ) {
60
60
self . key = key
61
61
let urlString = constructUrl ( key: key, options: options)
@@ -76,7 +76,7 @@ let CLIENT_NAME = "pusher-websocket-swift"
76
76
member who has just left the presence channel
77
77
78
78
- returns: A new PusherChannel instance
79
- */
79
+ */
80
80
open func subscribe(
81
81
_ channelName: String ,
82
82
onMemberAdded: ( ( PusherPresenceChannelMember ) -> ( ) ) ? = nil ,
Original file line number Diff line number Diff line change @@ -105,6 +105,11 @@ extension PusherConnection: WebSocketDelegate {
105
105
reconnectAttempts += 1
106
106
}
107
107
108
+ /**
109
+ Delegate method called when a websocket connected
110
+
111
+ - parameter ws: The websocket that connected
112
+ */
108
113
public func websocketDidConnect( socket ws: WebSocket ) {
109
114
self . socketConnected = true
110
115
}
Original file line number Diff line number Diff line change 34
34
35
35
internal class TaskQueue : CustomStringConvertible {
36
36
public typealias ClosureNoResultNext = ( ) -> Void
37
- public typealias ClosureWithResultNext = ( Any ? , @escaping ( Any ? ) -> Void ) -> Void
37
+ public typealias ClosureWithResultNext = ( Any ? , @escaping ( Any ? ) -> Void ) -> Void
38
38
39
39
internal var tasks = [ ClosureWithResultNext] ( )
40
40
internal lazy var completions = [ ClosureNoResultNext] ( )
You can’t perform that action at this time.
0 commit comments