File tree Expand file tree Collapse file tree 2 files changed +15
-5
lines changed
Expand file tree Collapse file tree 2 files changed +15
-5
lines changed Original file line number Diff line number Diff line change @@ -235,7 +235,7 @@ public class StompClient: WebSocketChannelDelegate {
235235 public func send( frame: inout Frame , using encoding: String . Encoding ? = . utf8) {
236236
237237 // support transaction
238- if ( transaction = = nil ) {
238+ if ( transaction ! = nil ) {
239239 frame. addHeader ( FrameHeader ( k: Headers . TRANSACTION. rawValue, v: transaction!. trxId) )
240240 }
241241
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ import Foundation
1313 * another Websocket library. Future versions of StompClientKit may add new Websocket libraries.
1414 */
1515public protocol WebSocketChannel : class {
16-
16+
1717 /**
1818 * Build a new channel using a Websocket URL .
1919 */
@@ -50,12 +50,22 @@ public protocol WebSocketChannel: class {
5050 var delegate : WebSocketChannelDelegate { get set }
5151}
5252
53- /**
54- *
55- */
53+
54+ /// WebSocketChannelDelete
55+ /// defines callbacks when Websocket event occoured.
5656public protocol WebSocketChannelDelegate {
57+
58+ /// Callbak after websocket channel connected
5759 func onChannelConnected( )
60+
61+ /// Call back after websocket channel disconnected
5862 func onChannelDisConnected( )
63+
64+ /// Text handler
65+ /// - Parameter text: Text that received from websocket server.
5966 func onText( received text: String )
67+
68+ /// Error handler
69+ /// - Parameter error: <#error description#>
6070 func onChannelError( _ error: Error )
6171}
You can’t perform that action at this time.
0 commit comments