Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed ACK id header and added new ACK type #62

Merged
merged 2 commits into from
Aug 6, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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