From 1e1b3f4ccb203f596e82e304daa08a78727d1a0d Mon Sep 17 00:00:00 2001 From: Dmytro Romaniuk Date: Mon, 5 Aug 2019 11:02:21 +0200 Subject: [PATCH 1/2] - updated message id and ack mode to the latest standard --- StompClientLib/Classes/StompClientLib.swift | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/StompClientLib/Classes/StompClientLib.swift b/StompClientLib/Classes/StompClientLib.swift index 9ee281f..7dbdcac 100755 --- a/StompClientLib/Classes/StompClientLib.swift +++ b/StompClientLib/Classes/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 @@ -377,6 +379,9 @@ public class StompClientLib: NSObject, SRWebSocketDelegate { case StompAckMode.ClientMode: ack = StompCommands.ackClient break + case StompAckMode.ClientIndividaulMode: + ack = StompCommands.ackClientIndividual + break default: ack = StompCommands.ackAuto break From 5b25a0275854e169f7692455839410cb664cdaec Mon Sep 17 00:00:00 2001 From: Dmytro Romaniuk Date: Mon, 5 Aug 2019 12:02:28 +0200 Subject: [PATCH 2/2] - fixed typo --- StompClientLib/Classes/StompClientLib.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/StompClientLib/Classes/StompClientLib.swift b/StompClientLib/Classes/StompClientLib.swift index 7dbdcac..a442075 100755 --- a/StompClientLib/Classes/StompClientLib.swift +++ b/StompClientLib/Classes/StompClientLib.swift @@ -379,7 +379,7 @@ public class StompClientLib: NSObject, SRWebSocketDelegate { case StompAckMode.ClientMode: ack = StompCommands.ackClient break - case StompAckMode.ClientIndividaulMode: + case StompAckMode.ClientIndividualMode: ack = StompCommands.ackClientIndividual break default: