Skip to content

Commit

Permalink
fix: modified access modifiers.
Browse files Browse the repository at this point in the history
  • Loading branch information
dodo849 committed Jun 4, 2024
1 parent 8672ccb commit b80cb12
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Sources/StompClient/StompClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public final class StompClient: NSObject, URLSessionDelegate, StompProtocol {
private var receiveCompletions: [String: [ReceiveCompletion]] = [:]
private var idByTopic: [String: String] = [:]

init(url: URL) {
public init(url: URL) {
self.url = url
self.websocketClient = WebSocketClient(url: url)
super.init()
Expand Down
2 changes: 1 addition & 1 deletion Sources/StompClient/StompError.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import Foundation

enum StompError: Error {
public enum StompError: Error {
case invalidCommand
case invalidHeader
case invalidBody
Expand Down
3 changes: 2 additions & 1 deletion Sources/StompClient/StompRequestMessage.swift
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ protocol StompRequestMessage {
}

extension StompRequestMessage {
func toFrame() -> String {
public func toFrame() -> String {
var frame = "\(command.rawValue)\n"
for (key, value) in headers {
frame += "\(key):\(value)\n"
Expand Down Expand Up @@ -158,6 +158,7 @@ struct StompDisconnectMessage: StompRequestMessage {
}


// 🔽 not supported yet
struct StompNackMessage: StompRequestMessage {
let command: StompRequestCommand = .nack
let headers: [String: String]
Expand Down
4 changes: 2 additions & 2 deletions Sources/StompClient/StompResponseMessage.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public struct StompReceiveMessage {
}

extension StompReceiveMessage {
func decode(
public func decode(
using encoding: String.Encoding = .utf8
) -> String? {
guard let data = body else {
Expand All @@ -30,7 +30,7 @@ extension StompReceiveMessage {
return String(data: data, encoding: encoding)
}

func decode<D: Decodable>(
public func decode<D: Decodable>(
_ type: D.Type,
using decoder: JSONDecoder = JSONDecoder()
) throws -> D? {
Expand Down

0 comments on commit b80cb12

Please sign in to comment.