Skip to content

Commit 65ea7fa

Browse files
authored
Merge pull request #62 from rodmytro/fix_acknowledge
Fixed ACK id header and added new ACK type
2 parents 694786b + 5b25a02 commit 65ea7fa

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

StompClientLib/Classes/StompClientLib.swift

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ struct StompCommands {
2525
static let controlChar = String(format: "%C", arguments: [0x00])
2626

2727
// Ack Mode
28+
static let ackClientIndividual = "client-individual"
2829
static let ackClient = "client"
2930
static let ackAuto = "auto"
3031
// Header Commands
@@ -35,7 +36,7 @@ struct StompCommands {
3536
static let commandHeaderContentType = "content-type"
3637
static let commandHeaderAck = "ack"
3738
static let commandHeaderTransaction = "transaction"
38-
static let commandHeaderMessageId = "message-id"
39+
static let commandHeaderMessageId = "id"
3940
static let commandHeaderSubscription = "subscription"
4041
static let commandHeaderDisconnected = "disconnected"
4142
static let commandHeaderHeartBeat = "heart-beat"
@@ -54,6 +55,7 @@ struct StompCommands {
5455
public enum StompAckMode {
5556
case AutoMode
5657
case ClientMode
58+
case ClientIndividualMode
5759
}
5860

5961
// Fundamental Protocols
@@ -377,6 +379,9 @@ public class StompClientLib: NSObject, SRWebSocketDelegate {
377379
case StompAckMode.ClientMode:
378380
ack = StompCommands.ackClient
379381
break
382+
case StompAckMode.ClientIndividualMode:
383+
ack = StompCommands.ackClientIndividual
384+
break
380385
default:
381386
ack = StompCommands.ackAuto
382387
break

0 commit comments

Comments
 (0)