Skip to content

Commit

Permalink
Merge pull request #62 from rodmytro/fix_acknowledge
Browse files Browse the repository at this point in the history
Fixed ACK id header and added new ACK type
  • Loading branch information
WrathChaos authored Aug 6, 2019
2 parents 694786b + 5b25a02 commit 65ea7fa
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion StompClientLib/Classes/StompClientLib.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"
Expand All @@ -54,6 +55,7 @@ struct StompCommands {
public enum StompAckMode {
case AutoMode
case ClientMode
case ClientIndividualMode
}

// Fundamental Protocols
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 65ea7fa

Please sign in to comment.