Skip to content

Commit 73b8498

Browse files
committed
PR Merged: #62
1 parent 65ea7fa commit 73b8498

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

Example/StompClientLib.swift

Lines changed: 7 additions & 2 deletions
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
@@ -167,7 +169,7 @@ public class StompClientLib: NSObject, SRWebSocketDelegate {
167169
} else {
168170
let parts = line.components(separatedBy: ":")
169171
if let key = parts.first {
170-
headers[key] = parts.last
172+
headers[key] = parts.dropFirst().joined(separator: ":")
171173
}
172174
}
173175
}
@@ -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

StompClientLib.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
Pod::Spec.new do |s|
1010
s.name = 'StompClientLib'
11-
s.version = '1.3.5'
11+
s.version = '1.3.6'
1212
s.summary = 'Simple STOMP Client library. Swift 3, 4, 4.2, 5 compatible'
1313
s.swift_version = '4.0', '4.2', '5.0'
1414

0 commit comments

Comments
 (0)