diff --git a/Example/StompClientLib.swift b/Example/StompClientLib.swift index 20a9176..ff55f38 100755 --- a/Example/StompClientLib.swift +++ b/Example/StompClientLib.swift @@ -25,6 +25,7 @@ struct StompCommands { static let controlChar = String(format: "%C", arguments: [0x00]) // Ack Mode + static let ackClientIndividual = "client-individual" static let ackClient = "client" static let ackAuto = "auto" // Header Commands @@ -35,7 +36,7 @@ struct StompCommands { static let commandHeaderContentType = "content-type" static let commandHeaderAck = "ack" static let commandHeaderTransaction = "transaction" - static let commandHeaderMessageId = "message-id" + static let commandHeaderMessageId = "id" static let commandHeaderSubscription = "subscription" static let commandHeaderDisconnected = "disconnected" static let commandHeaderHeartBeat = "heart-beat" @@ -54,6 +55,7 @@ struct StompCommands { public enum StompAckMode { case AutoMode case ClientMode + case ClientIndividualMode } // Fundamental Protocols @@ -167,7 +169,7 @@ public class StompClientLib: NSObject, SRWebSocketDelegate { } else { let parts = line.components(separatedBy: ":") if let key = parts.first { - headers[key] = parts.last + headers[key] = parts.dropFirst().joined(separator: ":") } } } @@ -377,6 +379,9 @@ public class StompClientLib: NSObject, SRWebSocketDelegate { case StompAckMode.ClientMode: ack = StompCommands.ackClient break + case StompAckMode.ClientIndividualMode: + ack = StompCommands.ackClientIndividual + break default: ack = StompCommands.ackAuto break diff --git a/StompClientLib.podspec b/StompClientLib.podspec index 784a96d..49c4e18 100755 --- a/StompClientLib.podspec +++ b/StompClientLib.podspec @@ -8,7 +8,7 @@ Pod::Spec.new do |s| s.name = 'StompClientLib' - s.version = '1.3.5' + s.version = '1.3.6' s.summary = 'Simple STOMP Client library. Swift 3, 4, 4.2, 5 compatible' s.swift_version = '4.0', '4.2', '5.0'