Set payload/payload size
twodayslate opened this issue · 5 comments
Currently the payload is fixed as fingerprint.uuid
. This should be user configurable.
This wasn't as straightforward as I thought. Adding a variable-sized payload messes with the memory layout in ways I didn't intend. I will need to think this through when I have more time.
v1.1.12 now includes support for customizing payload size.
'payloadSize' is inaccessible due to 'internal' protection levels
Thank you for the quick implementations! This is perfect otherwise.
This happily compiles for me:
var conf = PingConfiguration(interval: 1, with: 1)
conf.timeToLive = 58
conf.payloadSize = 64
Can you post the code that's giving you the protection error?
Internal access enables entities to be used within any source file from their defining module, but not in any source file outside of that module. You typically use internal access when defining an app’s or a framework’s internal structure.
All entities in your code (with a few specific exceptions, as described later in this chapter) have a default access level of internal if you don’t specify an explicit access level yourself.
https://docs.swift.org/swift-book/LanguageGuide/AccessControl.html
I am using SwiftyPing in an Xcode project as a dependency. The properties just need to be marked public
.