Skip to content

Commit 4079777

Browse files
committed
Updated docs
1 parent c3c574e commit 4079777

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Sources/OSCKitCore/OSCAddressSpace/OSCAddressSpace.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ extension OSCAddressSpace {
133133
/// Returns all OSC address nodes matching the address pattern.
134134
///
135135
/// - Note: This will not automatically execute the closure blocks that may be associated with
136-
/// the methods. To execute the closures, invoke the ``dispatch(_:on:)`` function instead.
136+
/// the methods. To execute the closures, invoke the ``dispatch(_:)`` function instead.
137137
///
138138
/// - Remark: An OSC Method is defined as being the last path component in the address. OSC
139139
/// Methods are the potential destinations of OSC messages received by the OSC server and

Sources/OSCKitCore/OSCKitCore.docc/OSC-Address-Pattern-Parsing.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ func performMethodB(_ str: String, _ int: Int?) { }
101101

102102
- When registering a local method, it can also store a closure. This closure can be executed automatically when matching against a received OSC message's address pattern.
103103
- When an OSC message is received:
104-
- Pass its address pattern to the ``OSCAddressSpace/dispatch(_:on:)``.
104+
- Pass its address pattern to the ``OSCAddressSpace/dispatch(_:)``.
105105
- This method will pattern-match it against all registered local addresses and execute their closures, optionally on a specified queue.
106106
- It also returns an array of local method IDs that match exactly like ``OSCAddressSpace/methods(matching:)`` (which may be discarded if handling of unregistered/unrecognized methods is not needed).
107107
- If the returned method ID array is empty, that indicates that no methods matched the address pattern. In this case you may want to handle the unhandled message in a special way.
@@ -120,8 +120,8 @@ addressSpace.register(localAddress: "/some/address/methodB") { values in
120120
```
121121

122122
```swift
123-
func handle(message: OSCMessage) throws {
124-
let ids = addressSpace.dispatch(message)
123+
func handle(message: OSCMessage) async throws {
124+
let ids = await addressSpace.dispatch(message)
125125
if ids.isEmpty {
126126
print("Received unhandled OSC message:", message)
127127
}

0 commit comments

Comments
 (0)