schollz / peerdiscovery

Pure-Go library for cross-platform local peer discovery using UDP multicast :woman: :repeat: :woman:
MIT License
644 stars 56 forks source link

Add possibility to generate payload dynamically #17

Closed shvydky closed 4 years ago

shvydky commented 4 years ago

In my case, it is required to send different payloads in every broadcast.

I propose to have an optional function pointer in Settings that will return payload on demand. In case when this pointer is nil the implementation should fallback to Payload field.

I will try to implement this in the fork and create PR.

@schollz, please let me know what do you think about my idea?

schollz commented 4 years ago

Sounds great! Feel free to add